Why is this logic not displaying properly?

  • Author
    Posts
  • #1011457

    beta.inter-club.co.uk

    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:

    <?php
    $args = array(
    ‘category_name’ => ‘blog’,
    ‘post_type’ => ‘post’,
    ‘posts_per_page’ => 9
    //’paged’ => ( get_query_var(‘paged’) ? get_query_var(‘paged’) : 1),
    );
    query_posts($args);
    $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>
    </div><!–//home_blog_box–>

    <?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 beta.inter-club.co.uk.

    #1011557

    supportbot
    Member

    The blog you specified at beta.inter-club.co.uk does not appear to be hosted at WordPress.com.

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

    If you don’t understand the difference between WordPress.com and WordPress.org, 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.

    #1011563

    ok – still, if anyone knows…! please let me know!

The topic ‘Why is this logic not displaying properly?’ is closed to new replies.