Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Page & Category Menu Bars (http://forum.bytesforall.com/forumdisplay.php?f=10)
-   -   Do not show one or more categories in recent post list (http://forum.bytesforall.com/showthread.php?t=3721)

megatrader Oct 4, 2009 03:41 AM

Do not show one or more categories in recent post list
 
Hi
Which place of Atahualpa Theme I should use this code to hiding one or more categories in recent post list.
Code:

<ul>
<?php
    $recentPosts = new WP_Query();
    $recentPosts->query('showposts=5&cat=-XX,-YY,-ZZ');
?>
<?php while ($recentPosts->have_posts()) : $recentPosts->the_post(); ?>
    <li><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></li>
<?php endwhile; ?>
</ul>

Best Regards

juggledad Oct 4, 2009 05:38 AM

What release of Atahualpa, and WP?
are you looking for this to be in a widget, page?

megatrader Oct 4, 2009 06:03 AM

Quote:

Originally Posted by juggledad (Post 15884)
What release of Atahualpa, and WP?
are you looking for this to be in a widget, page?

Atahualpa 3.4.4 - wp 2.8.4.
are you looking for this to be in a widget, page? yes

juggledad Oct 4, 2009 10:08 AM

well if you want it in a widget, you can use the PHP Code plugin or use the exec-PHP plugin and add a text widget and add the code to it.

Cédric H Oct 5, 2009 11:16 AM

another solution could be to use a plugin like advanced category excluder


All times are GMT -6. The time now is 12:56 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.