reefless
Forum Replies Created
Viewing 6 replies - 1 through 6 (of 6 total)
-
thx mate! it works perfectly!
yeh i need to show on the content page, i just didn’t want to show on Recent post page
I built my own theme and this is how i display Recent posts page:
<?php /* Template Name: Recent Post */ ?> <?php get_header(); ?> <div class="container"> <div class="row content"> <?php if(have_posts()) : ?> <?php while(have_posts()) : the_post(); ?> <!-- Start Recent Posts --> <?php the_content(); ?> <?php $current_date =""; $count_posts = wp_count_posts(); $nextpost = 0; $published_posts = $count_posts->publish; $myposts = get_posts(array('posts_per_page'=>$published_posts)); foreach($myposts as $post) : $nextpost++; setup_postdata($post); $date = get_the_date("F Y"); ?> <div class="row"> <div class="col-md-4 img_preview"> <?php if ( has_post_thumbnail() ) : ?> <a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>"> <?php the_post_thumbnail(); ?> </a> <?php endif; ?> </div> <div class="col-md-6 content_preview"> <section> <h3><?php the_title();?><small><?php foreach((get_the_category()) as $category) { echo $category->cat_name . ' '; } ?>tagged</small></h3> <p class="text-justify"><?php the_excerpt(); ?></p> </section> </div> </div> <?php endforeach; wp_reset_postdata(); ?> <?php endwhile; ?> <?php endif; ?> <!-- End Recent Posts --> </div> </div> <?php get_sidebar();?> <div style = "clear:both"></div> <?php get_footer(); ?>
*I already put code [likebtn_off] in the page but it doesn’t help*
If you need my website code to find solution, pls tell me i can provide you with it
sent! I think it appear because of the except wordpress function
i already tried. I want to exclude from Recent posts page, but in “Exclude post/page IDs” there is no Recent posts page. There are only Home Archive Search Category
Viewing 6 replies - 1 through 6 (of 6 total)