</li> '; } ?> </ul> </div> </div> <div class="life-style col-md-12"> <header> <h3 class="title-head">What's hot!</h3> </header> <?php global $alreadyOnPagePosts; $hotPosts = getLatestPopularMiniPost(7); $count = 0; while (($hotpost = $hotPosts->fetch_assoc()) && $count < 4) { if (!in_array($hotpost['url'], $alreadyOnPagePosts)) { array_push($alreadyOnPagePosts, $hotpost['url']); if ($count % 2 == 0) { echo '<div class="life-style-grids"> <div class="life-style-left-grid">'; } else { echo ' <div class="life-style-right-grid">'; } echo ' <a href="' . $mainUrl . $hotpost['url'] . '"><img src="' . $mainUrl . $hotpost['cover_image'] . '" alt="" /></a> <a class="title" href="' . $mainUrl . $hotpost['url'] . '">' . $hotpost['title'] . '</a> ';
</div> </div> <div class="col-md-12 "> <div class="latest-articles"> <div class="main-title-head"> <header> <h3 class="title-head">What's Hot</h3> </header> </div> <div class="world-news-grids"> <?php $latestPopularPosts = getLatestPopularMiniPost(3); while ($latestPopularPost = $latestPopularPosts->fetch_assoc()) { echo ' <div class="world-news-grid"> <img src="' . $mainUrl . $latestPopularPost['profile_image'] . '" alt="" /> <a href="' . $mainUrl . $latestPopularPost['url'] . '" class="title">' . $latestPopularPost['title'] . ' </a> <p>' . $latestPopularPost['one_liner'] . '.</p> <a class="reu" href="' . $mainUrl . $latestPopularPost['url'] . '"><img src="images/more.png" alt="" /></a> </div> '; } ?> <div class="clearfix"></div> </div>