Support » Plugin: cbnet Different Posts Per Page » Am I dense?

  • So I’m new to coding, so please bear with me for no doubt asking a really dumb question. So I see where the options are under Dashboard – Settings-Reading, but I’m not sure then how to direct my posts to the different pages.
    Here is my site:

    right now I just want that one, first post to be on home page, and start directing future posts to other pages. I made a test post, put ‘blog’ as the category, then made a ‘Blog Page’ on my website. But I can’t figure out how to make the post, categorized as blog’ to actually go to the page. Where do I go to do this?

    Thanks so much for this plug-in, I really want it to work…I just need to get over my own idiocy, so please help!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Chip Bennett


    Theme Review Admin

    Hi caitic,

    First: no question is a dumb question. We all ultimately started at the same place. 🙂

    This Plugin isn’t really designed to do what you’re trying to accomplish. It sounds like you want your site front page to display the latest blog post, and then have all other posts appear on a different page?

    If so, you really want to look at using a static page as your site front page. Reference the Codex here:

    Follow those instructions, and you’ll have a static page as your front page, and your blog posts index on a separate page. At that point, you’ll be half-way to where you need to be.

    The next thing you’ll need to do is create a special, custom page template, named front-page.php, to display your custom content. In your case, your custom content will be a loop with the single, most-recent blog post.

    Without knowing what Theme you use, I can’t provide specifics, but assuming your page.php template looks something like this:

    <?php get_header(); ?>
    <div id="content">
        <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
             <?php // Loop markup here ?>
        <?php endwhile; endif; ?>
    <?php get_sidebar(); ?>
    <?php get_footer(); ?.

    You’ll need to make a change to this part:

    <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
         <?php // Loop markup here ?>
    <?php endwhile; endif; ?>

    Replace that with this:

    $latest_post_query_args = array(
        'posts_per_page' => 1
    $latest_post = new  WP_Query( $latest_post_query_args );
    <?php if ( $latest_post->have_posts() ) : while ( $latest_post->have_posts() ) : $latest_post->the_post(); ?>
         <?php // Loop markup here ?>
    <?php endwhile; endif; ?>
    <?php wp_reset_postdata(); ?>

    Now, WordPress will use your front-page.php template to render the static front page, and the front page will display the latest blog post.

    Thanks Chip! For your answer of course but for being so patient with me as I learn.

    I had thought of doing the static page, but the person I’m doing the website for is thinking down the road they would like to be able to split posts up and direct them to different pages. So eventually I’d need to learn how to do that.

    But am I still confused on what this plug in is for and trying to use it wrong?

    Thank you SO much for taking the time to give me that coding for the front-page.php template. Should I still implement that? Can you give me some guidance on then how I’d split the posts up between different pages?
    Sorry for all my questions!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Am I dense?’ is closed to new replies.