Forum Replies Created

Viewing 4 replies - 1 through 4 (of 4 total)
  • mjjack

    (@mjjack)

    I’m a bit of a PHP noob as well but I was able to get this to work. What you need to do is insert the bits of code he posts to your Main Index Template inside of the loop that generates the posts. So find this code:


    <?php if (have_posts()) : ?>

    <?php while (have_posts()) : the_post(); ?>

    Then right after that insert:

    <?php static $ctr = 0;
    if ($ctr == "3") { break; }
    else { ?>

    With $ctr == “3” being the number of posts you want to show. Right after that bit there should be a div class=”post” which generates all the post information. Now scroll down to the end of that div. Right before the <?php endwhile; ?>, paste this:

    <?php $ctr++; } ?>

    That’s it! Save the template and check your site. You should see only 3 posts on the home page. All archive and category pages should show whatever you set as the default.

    Ah, okay, it was just a cache problem. If you’re having this problem just reload the page and your changes should show up.

    Ah, okay, it was just a cache problem. If you’re having this problem just reload the page and your changes should show up.

    Does anyone have a solution to this? I am having the same problem.

Viewing 4 replies - 1 through 4 (of 4 total)