Wordpress Themes - WP Forum at BFA
There will be no more development for Atahualpa (or any other theme), and no support. Also no new registrations. I turned off the donation system. I may turn the forum to read only if it gets abused for spam. Unfortunately I have no time for the forum or the themes. Thanks a lot to the people who helped in all these years, especially Larry and of course: Paul. Take care and stay healthy -- Flynn, Atahualpa developer, Sep 2021

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, 04: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, 06:38 AM
juggledad's Avatar
juggledad
 
23,765 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, 07: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 07:18 AM. Reason: change 3.4.1 to 3.4.4
  #4  
Old Oct 4, 2009, 11:08 AM
juggledad's Avatar
juggledad
 
23,765 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, 12:16 PM
Cédric H
 
8 posts · Sep 2009
Western France
another solution could be to use a plugin like advanced category excluder

Bookmarks



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 05:43 AM
[SOLVED] Category list not displaying all categories TV Lowdown Page & Category Menu Bars 0 Sep 4, 2009 08:11 AM
"Recent-comment" widget (list style) cosmiclove Sidebars & Widgets 5 Jul 13, 2009 07:05 PM
Show empty categories olsonsp4c Page & Category Menu Bars 2 Apr 22, 2009 11:41 PM
how to show only categories with a high number of posts ? elpidiofilho Atahualpa 3 Wordpress theme 4 Mar 17, 2009 03:43 PM


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


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