• Hello,

    I’m just trying to list my latest posts – whether they are individual ones or part of a series. But for example, the last 6 posts I created do not get listed on the frontend as the last 6 posts – sometimes the first part of a series gets listed instead of the third part even though it’s older. Is there a fix for this?

    Thanks.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi there,

    It’s a bit unclear how to reproduce what you are describing here.

    Where are you trying to list your latest posts? The main content of your site in the frontend? In the sidebar on the frontend of your site?

    How are you trying to list your latest posts? Via custom code that is written for your site? Using WordPress core functions? Using a plugin’s shortcode? A custom theme? A custom block?

    Are the 6 posts you created part of a series? Are only a few of them part of a series? Are you wanting the list of posts on the frontend to be ordered by the series part, instead of the date they were published (which is the default for WordPress)?

    Thread Starter kvetos

    (@kvetos)

    Hello,

    I’ve created a category called latest videos and I’m using the following code in the homepage template to show the list:

    <?php $catquery = new WP_Query( 'cat=21&posts_per_page='6' ); ?>
    	<ul>
    	<?php while($catquery->have_posts()) : $catquery->the_post(); ?>
    		<li><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></li>
    	<?php endwhile; ?> 
    	</ul>
    <?php wp_reset_postdata(); ?>
    

    I have a mixture of single posts and series posts. So what I want to do is show the last 6 posts in that category by date whether they are single posts or part of a series e.g.

    How to do X
    How to do Y part 3 of the series
    How to do Z

    But if a post is part of a series it does not show up as a latest post in that category list.

    Thanks.

    • This reply was modified 4 years, 10 months ago by kvetos.
    • This reply was modified 4 years, 10 months ago by kvetos. Reason: code tags
    Thread Starter kvetos

    (@kvetos)

    Hello,

    I guess there is no answer. Thanks anyway. I’ll look for an alternative plugin.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘List latest posts’ is closed to new replies.