• Hello,

    I’m a big fan of this Pique theme. I would prefer to display more than 3 recent blogs posts on the Post Page panel page, however I don’t know if this possible or how to do this. Does anyone have a solution?

    Thanks very much!
    Monique

    fullywoven.com

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

    I’m glad Pique’s working well for you!

    It is possible to increase the number of posts that display in the recent posts panel, however, the steps needed do require you to play about a little with the theme’s PHP.

    If you’re comfortable doing that then the first step is for you to set up a child theme.

    The following guides provide a good introduction to child themes, including steps to set one up:

    After you have set your child theme up, copy the parent’s components/content-front.php file to your child theme’s directory and then open it in your favourite text/code editor.

    Locate the following code in that file:

    <?php // Show four most recent posts
    $recent_posts = new WP_Query( array(
    	'posts_per_page' => 3,
    	'post_status'    => 'publish',
    ) );
    ?>

    Change the number next to 'posts_per_page' => from 3 to the number of posts you wish to display.

    Next, locate the following code in the file:

    while ( $count < 3 AND $recent_posts->have_posts() ) : $recent_posts->the_post();

    Again, change the number 3 to the number of posts you wish to display.

    Save you changes and the updated number of posts will then display on that section of your site.

    Let me know how you get on with that! I’ll be happy to help if any questions come up along the way.

    Thread Starter fullywoven

    (@fullywoven)

    Thanks very much for that thorough answer Siobhan! I shall give it go later this week and let you know if I’m successful. I’ve never created a child theme and I’m excited to learn something new.

    You’re welcome! We’re right here if questions do come up while setting up your child theme. ??

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘how to display more than 3 blog posts?’ is closed to new replies.