function get_mainBanner($table) { include 'koneksi.php'; $i = 0; $sql = "select * from " . $table . " where topper = 2 order by " . $table . "ID desc limit 10"; $rs = mysql_query($sql); while ($fetch = mysql_fetch_array($rs)) { $id = $fetch[0]; echo '<div class="item-list col-xs-12 nopadding"> <a href="detailberita.php?id=' . $id . '"> <div class="item-img"><img class="' . imgResponsive() . '" src="../admin/images/' . $table . '/' . $fetch['foto1'] . '"></div> <div class="item-caption"> <div class="item-caption-title">' . $fetch['judul'] . '</div> <!-- <div class="readmore">id number => ' . $id . '</div> --> </div> </a> </div>'; } }
?> <article id="post-<?php the_ID(); ?> " <?php post_class(); ?> > <div class="content-segment header clearfix"> <div class="latest-post"> <?php $args = array('numberposts' => '1', 'category_name' => 'article'); $recent_posts = wp_get_recent_posts($args); foreach ($recent_posts as $recent) { imgResponsive(); $postThumb = get_the_post_thumbnail($recent["ID"], 'postThumb_desktop'); $postThumb_mobile = get_the_post_thumbnail($recent["ID"], 'postThumb_mobile'); $postLink = get_permalink($recent["ID"]); $postTitle = $recent["post_title"]; $postExcerpt = $recent["post_excerpt"]; echo '<div class="_leftCol col-sm-7"> <div class="post-title" data-slide="left"><h2 class="bold">' . $postTitle . '</h2></div> <div class="post-excerpt">' . $postExcerpt . '</div> <div class="post-link"><a href="' . $postLink . '">baca selanjutnya ...</a></div> </div>'; if (wp_is_mobile()) { echo '<div class="_rightCol col-sm-5"><div class="post-thumb special-img "><a href="">' . $postThumb_mobile . '</a></div></div>'; // the_post_thumbnail('featuredImage_mobile', array( 'class' => 'img-responsive fullwidth')); } else { echo '<div class="_rightCol col-sm-5"><div class="post-thumb special-img "><a href="">' . $postThumb . '</a></div></div>';
<?php echo '<div class="item-list col-xs-12 nopadding"> <a href="detailberita.php?id=' . $id . '"> <div class="item-img"><img class="' . imgResponsive() . '" src="../admin/images/' . $table . '/' . $fetch['foto1'] . '"></div> <div class="item-caption"> <div class="item-caption-title">' . $fetch['judul'] . '</div> <div class="item-caption-content">' . truncate($isi, 150) . '</div> <!-- <div class="readmore">id number => ' . $id . '</div> --> </div> </a> </div>';
<div class="item-list"> <div class="img col-xs-12 col-lg-6"> <img class="<?php echo imgResponsive(); ?> " src="../admin/images/<?php echo $table; ?> /<?php echo $fetch['foto2']; ?> " alt="" /> </div> <div class="desc col-xs-12 col-lg-6"> <div class="user-post-title"> <?php echo $fetch['judul']; ?> </div> <div class="user-post-content"> <?php echo truncate($isi, $charLimit); ?> </div> <div class="readmore text-right "> <a href="detailberita.php?id=<?php echo $fetch['beritaID']; ?> ">selengkapnya</a> </div> <div class="author hidden-xs">Oleh <?php