Need help? Check out our Support site, then


How can i exclude specific categorposts in my widgets!

  1. Hi Guys,

    I would seriously appreciate somebodys help.

    My widget calls all latest posts in all categories applying a thumbnail, title, brief description.

    I want to exclude one of my categories from posting in this widget.

    Please see http://www.norwichcartrader.co.uk

    You can see the right side widget called " Recent News" the current top two posts are from the category "Wanted" of which i would like to exclude from this widget.

    By looking at the code in "functions.php" i can see this!:

    --------------------------------------------------------------------------------

    <div id="recent" class="widget">
    <h3>Recent News</h3>

      <?php $recent = new WP_Query('caller_get_posts=1&showposts=' . $number );
      while( $recent->have_posts() ) : $recent->the_post();
      global $post; global $wp_query;?>
      ---------------------------------------------------------------------------------

      If somebody could help me modify this to exclude "wanted" category then I would be grateful!

  2. Sorry, if you are playing with functions.php, then you are in the wrong forum and need to head over to http://wordpress.ORG/support/ as that is where self-hosted wordpress blogs using the software from wordpress.ORG are supported.

    These forums are for those hosted here on the wordpress.COM free hosting service and things here work differently and our answers typically will not work for you.

    If you do not know the difference, see this support document: http://en.support.wordpress.com/com-vs-org/ .

Topic Closed

This topic has been closed to new replies.

About this Topic