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 » Sidebars & Widgets »

Exclude category from Recent Posts in sidebar


  #1  
Old Mar 19, 2009, 03:05 PM
paulae's Avatar
paulae
 
1,333 posts · Feb 2009
Wordpress 3.4.1, Atahualpa 3.7.7
I do not want the latest obituary posts showing up in the Recent Posts sidebar widget on the left.
http://larchmontgazette.com/wp27/

I want to be able to exclude obituaries and maybe some other categories, in the future, from the sidebar widget. I tried the Advanced Category Excluder plugin, but it didn't do a thing for me. I don't see any other likely plugins when I search the Wordpress plugin directory.

Help!
  #2  
Old Mar 20, 2009, 04:48 PM
Flynn's Avatar
Flynn
 
3,768 posts · Oct 2008
Munich, Germany
Use one instance of the PHP code widget http://wordpress.org/extend/plugins/php-code-widget/ and inside the widget put:
PHP 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>
In showposts=5&cat=-XX,-YY,-ZZ replace 5 with amount of posts and XX, YY and ZZ with the ID's of the categories that should be excluded
  #3  
Old Mar 20, 2009, 05:24 PM
paulae's Avatar
paulae
 
1,333 posts · Feb 2009
Wordpress 3.4.1, Atahualpa 3.7.7
I got it working, thanks!

Very nice.

You're the best!

Last edited by paulae; Mar 20, 2009 at 05:54 PM.
  #4  
Old Apr 21, 2009, 07:18 PM
Flynn's Avatar
Flynn
 
3,768 posts · Oct 2008
Munich, Germany
That's kinda funny, I just googled for this and found my own post
  #5  
Old Apr 21, 2009, 08:23 PM
paulae's Avatar
paulae
 
1,333 posts · Feb 2009
Wordpress 3.4.1, Atahualpa 3.7.7
Mirrors within mirrors.
  #6  
Old Jan 29, 2011, 03:29 AM
anou
 
1 posts · Jan 2011
Lyon
Just what i was searching for.
Thank you
  #7  
Old Mar 18, 2011, 06:04 AM
Helleshoj
 
1 posts · Mar 2011
Randers, Denmark
Interesting, but for one or another reason in my site it still shows all the categories. Wordpress 3.1, PHP 5.
  #8  
Old Mar 18, 2011, 06:13 AM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
What version of Atahualpa?
What is the URL?
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #9  
Old Apr 13, 2011, 11:33 AM
dkat1043
 
3 posts · Apr 2011
Sorry to jump in, but I have a similar problem. I want to exclude a category from the next/previous listing on the single-post page. I've used a plug-in to disable the category from appearing on the home page, but it shows up in the sidebar listing of categories on the single-post page, and in the next/previous header. I'm not sure where in Atahualpa to look to edit this page template, or whether there's an easy way to keep the category out of these listings. Using theme v. 3.2, Wp v 3.1.1. Thanks.
  #10  
Old Apr 13, 2011, 12:14 PM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
Version 3.2?? Wow are you using an old version of Atahualpa.

The things in the sidebar are widgets. Without the site URL or knowing what widget you are using I can't tell you if it is an Atahualpa widget or from someone else. If it is from someone else then you have to look at the plugin code and/or contact the plug-in's author about this.
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #11  
Old Apr 13, 2011, 12:28 PM
dkat1043
 
3 posts · Apr 2011
Yes, it is an older version. It took a while to get the site set up and customized, and I've been concerned that upgrading might break something, but I guess I have to take the plunge at some point.

An example of the single post page is here: http://tiffanyannlewis.com/blog2/?p=4678 You can see that the next post in the header is a date, which is the title of a post in the category called Itinerary. Itinerary shows up in the category list on the right, but if you go to the home blog page, it does not, as I intended it. I'm using a plugin called Category Exclusion.

So I'm wondering where in the code I can go to get Itinerary Category to not show up in the category list on the single post page, and not appear in the Next Post listing as well. I'm using the theme's default Category widget, modified by a plugin called Category Order.

Thanks for your help, and please let me know if you need more info.
  #12  
Old Apr 13, 2011, 03:25 PM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
So you are using the 'Categories' widget in the right sidebar...correct?

This widget is part of WordPress and not Atahualpa. What you should do is a google search on 'wordpress category plugin' and see if there is one that will let you exclude a category.
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #13  
Old Apr 13, 2011, 03:34 PM
paulae's Avatar
paulae
 
1,333 posts · Feb 2009
Wordpress 3.4.1, Atahualpa 3.7.7
I use a combination of Enhanced Recent Posts and Widget Logic plugins to control placement of categories.
  #14  
Old Apr 13, 2011, 08:21 PM
dkat1043
 
3 posts · Apr 2011
Thanks to both of you for your help. I'll check the code and the plugins.

Dan
  #15  
Old Mar 22, 2013, 05:55 AM
shawx
 
1 posts · Mar 2013
Hello all

I want to customize my wordpress widget by excluding first 3 posts from recent posts. I do not want to show them. I've set recent posts to show to 10 currently.

Please help. thanks
  #16  
Old Mar 22, 2013, 06:40 AM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
what version of Atahualpa and Wordpress are you on?
What widget are you talking about?
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #17  
Old Apr 9, 2013, 03:45 AM
belantos
 
73 posts · Oct 2011
Quote:
Originally Posted by Flynn
That's kinda funny, I just googled for this and found my own post
LOL. Google replaces our memory
__________________
If you think you have it hard, think again! http://www.peterblundy.com
  #18  
Old Apr 9, 2013, 09:34 AM
canhtt
 
2 posts · Apr 2013
Quote:
Originally Posted by Flynn
Use one instance of the PHP code widget http://wordpress.org/extend/plugins/php-code-widget/ and inside the widget put:
PHP 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>
In showposts=5&cat=-XX,-YY,-ZZ replace 5 with amount of posts and XX, YY and ZZ with the ID's of the categories that should be excluded
oh, so good, tks verry much

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Exclude widgets from sidebar deanw Sidebars & Widgets 2 Oct 24, 2010 08:50 AM
[SOLVED] Recent posts of same category, on single post pages GeoParadise Atahualpa 3 Wordpress theme 10 Apr 19, 2010 09:54 AM
Category Excluder Sidebar invisible hidden exclude Neil Grayson Forum How-To 1 May 25, 2009 08:02 PM
recent posts in the right sidebar, but not on the home page ind Sidebars & Widgets 1 May 6, 2009 04:49 AM
More! I want more! (recent posts in sidebar) paulae Sidebars & Widgets 0 Apr 9, 2009 09:43 PM


All times are GMT -6. The time now is 03:08 AM.


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