• Hi all,

    I am using the following to show the lastest post on the homepage, whilst excluding a particular category:

    <?php $recent = new WP_Query("cat=&exclude=134&showposts=1"); while($recent->have_posts()) : $recent->the_post();?>

    The only problem is that category has child categories, I would like to exclude these too, can somebody help me achieve this?

    Thanks

  • The topic ‘Exclude Child Categories’ is closed to new replies.