Need help? Check out our Support site, then

Why is this logic not displaying properly?

  1. interclublondon

    the homepage is meant to display the latest posts - 3 rows each of 3 posts, in chronological order.

    it works fine if I display up to 6 posts. But after that it starts putting the next post in random positions... why is this?

    here is the code in question:

    $args = array(
    'category_name' => 'blog',
    'post_type' => 'post',
    'posts_per_page' => 9
    //'paged' => ( get_query_var('paged') ? get_query_var('paged') : 1),
    $x = 0;
    while (have_posts()) : the_post(); ?>

    <?php if(($x == 2) || ($x=="5") || ($x=="8") || ($x=="11")) { ?>
    <div class="home_blog_box home_blog_box_last">
    <?php } else { ?>
    <div class="home_blog_box">
    <?php } ?>
    "><?php the_post_thumbnail('featured-blog'); ?>
    <h3>"><?php the_title(); ?></h3>

    <?php $x++; ?>
    <?php endwhile; ?>
    <?php wp_reset_query(); ?>

    <div class="clear"><p align="right"><font color="black">Click here for more Past Event Reviews</font></p></div>

    The blog I need help with is

  2. The blog you specified at does not appear to be hosted at

    This support forum is for blogs hosted at If your question is about a self-hosted WordPress blog then you'll find help at the forums.

    If you don't understand the difference between and, you may find this information helpful.

    If you forgot to include a link to your blog, you can reply and include it below. It'll help people to answer your question.

    This is an automated message.

  3. interclublondon

    ok - still, if anyone knows...! please let me know!

Topic Closed

This topic has been closed to new replies.

About this Topic