Forums

Conditional Tags and WP_Query - Wordpress Buggy ? (2 posts)

  1. isw79
    Member
    Posted 11 months ago #

    I'm trying to show latest post from a category


    <?php $my_query = new WP_Query('showposts=15&cat=6'); while ($my_query->have_posts()) : $my_query->the_post(); $do_not_duplicate = $post->ID; ?>
    SOME CODE
    <?php endwhile; ?>

    and to show after this a simple box inside a statement

    <?php if (is_home() && !is_paged()) {?><?php include (TEMPLATEPATH . '/box.php'); ?><?php } ?>

    Conditional Tag is not respected from Wordpress showing the box in every page. Wordpress must show the box only on home page (index.php).

    Do you have solutions ?

    Best Regards

  2. isw79
    Member
    Posted 11 months ago #

    A little update, this code is on sidebar and not inside index.php or whatsoever.

Reply

You must log in to post.

About this Topic