Wordpress Themes - WP Forum at BFA
Click here to register or to donate.
Auto self-registration is not available here - far too many spammers. This forum has many, many backlinks and because of that there is an intense desire among spammers to drop their links here.

Wordpress Themes - WP Forum at BFA » WordPress Themes » Atahualpa 3 Wordpress theme » Page & Category Menu Bars »

Do not show one or more categories in recent post list


  #1  
Old Oct 4, 2009, 03:41 AM
megatrader's Avatar
megatrader
 
2 posts · Oct 2009
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
  #2  
Old Oct 4, 2009, 05:38 AM
juggledad's Avatar
juggledad
 
23,655 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
What release of Atahualpa, and WP?
are you looking for this to be in a widget, page?
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #3  
Old Oct 4, 2009, 06:03 AM
megatrader's Avatar
megatrader
 
2 posts · Oct 2009
Quote:
Originally Posted by juggledad
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

Last edited by megatrader; Oct 4, 2009 at 06:18 AM. Reason: change 3.4.1 to 3.4.4
  #4  
Old Oct 4, 2009, 10:08 AM
juggledad's Avatar
juggledad
 
23,655 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
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.
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #5  
Old Oct 5, 2009, 11:16 AM
CÚdric H
 
8 posts · Sep 2009
Western France
another solution could be to use a plugin like advanced category excluder

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
List of Categories as a dropdown submenu to the Home menu fma Page & Category Menu Bars 6 Sep 22, 2009 04:43 AM
[SOLVED] Category list not displaying all categories TV Lowdown Page & Category Menu Bars 0 Sep 4, 2009 07:11 AM
"Recent-comment" widget (list style) cosmiclove Sidebars & Widgets 5 Jul 13, 2009 06:05 PM
Show empty categories olsonsp4c Page & Category Menu Bars 2 Apr 22, 2009 10:41 PM
how to show only categories with a high number of posts ? elpidiofilho Atahualpa 3 Wordpress theme 4 Mar 17, 2009 02:43 PM


All times are GMT -6. The time now is 11:37 AM.


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