?> "> <?php the_title(); ?> </a> <p> <?php $excerpt = get_post_custom_values('excerpt', get_the_ID()); if (!empty($excerpt)) { //echo filter_character($excerpt[0], 16); $excerpt = $excerpt[0]; } else { $excerpt = get_the_excerpt(); } echo filter_character($excerpt, 16); ?> </p> <div class="readmore"> <span class="left"></span> <a href="<?php the_permalink(); ?> "><?php echo $language == 'vi' ? 'Đọc thêm' : 'read more'; ?> <span class="arrow">››</span></a> </div> </figcaption> </figure> </div>
<?php if ($the_query->have_posts()) { ?> <div id="sidebar" class="col-md-4 col-sm-4 col-xs-12 article-all"> <div class="page-header"> <h2><?php echo $language == 'vi' ? 'Bài liên quan' : 'Featured'; ?> </h2> </div> <div class="row"> <div class="top-sub-featured"> <?php while ($the_query->have_posts()) { $the_query->the_post(); ?> <div class="col-md-6 col-sm-6 col-xs-6 mg-20 show-article"> <figure> <a href="<?php the_permalink(); ?> "> <?php $attachment_id = get_post_thumbnail_id(get_the_ID()); if (!empty($attachment_id)) { the_post_thumbnail(array(570, 380)); ?> <?php } else { echo '<img src="' . get_stylesheet_directory_uri() . '/images/no-img.jpg" alt="">';
if ($category[0]->slug == 'unideal') { ?> <p> <?php $str = get_post_custom_values('copon', get_the_ID()); echo $str[0]; ?> </p> <?php } else { ?> <p> <?php $str = get_post_custom_values('excerpt', get_the_ID()); $str = empty($str) ? get_the_excerpt() : $str[0]; echo filter_character($str, 16); ?> </p> <?php } ?> <div class="readmore"> <span class="left"></span> <a href="<?php the_permalink(); ?> "><?php echo $language == 'vi' ? 'Đọc thêm' : 'read more'; ?> <span class="arrow">››</span></a>