steadyvibe
Member
Posted 3 years ago #
I am excluding categories from my main page, rss and trying to exclude it from my archives drop down menu...
I am using the Category Visibility plugin (http://www.gudlyf.com/archives/2005/03/08/wordpress-plugin-category-visibility) and for some reason it doesn't exclude the category from my archives...
Has anyone had that problem?
Depending on what template tag you're using:
http://codex.wordpress.org/Template_Tags/wp_list_cats
http://codex.wordpress.org/Template_Tags/list_cats
See the info on the 'exclude' parameter.
Don't know a way to exclude them from an archive listing.
thecorch
Member
Posted 3 years ago #
I'm having the same problem. Doesn't exclude from archives, kind of annoying.
steadyvibe
Member
Posted 3 years ago #
Yeah, it is driving me crazy. It is the last thing I need to do before I go live with my site and it is taking forever to figure out.
Anyone have any hacks or fixes?
RobotDan
Member
Posted 3 years ago #
steadyvibe
Member
Posted 3 years ago #
I'm so far into the other plug-in that I can't switch now.
I guess i need something that in my dropdown menu for my categories it says display the archives from this 1 category and ignore all the others.
Is that possible?
steadyvibe
Member
Posted 3 years ago #
steadyvibe
Member
Posted 3 years ago #
Has anyone ever heard of this happening before and resolved it?
You can see what the problem is on the drop down menu on the right of the page here: http://www.steadyvibe.com
You will notice that there are a lot of archives that are not on the home page blog, they are from the inside pages that are in different categories. I would like only the home page entries to show up on the home page drop down archives.
juneallison
Member
Posted 3 years ago #
everything works fine and dandy until I click on an archive link (like "april 2006")...when I do that all my categories disappear. Instead it says "no categories." Any ideas?
Colin_Lewis
Member
Posted 3 years ago #
Make a template for your archive and use a query at the top of the page, i.e.
<?php query_posts('cat=-1'); ?>
which excludes category 1 from the page. Much better than a plugin IMHO!
More detailed info here:http://ifelse.co.uk/archives/2005/04/08/query_posts-redux/
/Colin
For the life of me, I cannot get query_posts to work correctly on an archive page. The site in question is casperelectronics. I have two categories on this site: 'casperstuff' and 'press'. I do NOT want any 'press' entries showing on the archive pages. I'm placing this code at the top of my archive.php page:
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
query_posts("cat=-3&paged=$paged");
where category 3 is 'press'. That should get every post except the Press posts, and the paging should then work correctly, based on info I found in this thread: getting previous/next links to work with query_posts.
However, although this works on the homepage of the site, using query_posts seems to break the archive page(s). Is the answer on this page and I'm just not seeing it? Thanks for any help.
I have the same problem with archives too, can anyone help?
- MENJ