TylerMartin
Member
Posted 5 years ago #
Is it just me or are excluded_categories no longer working in WP 2.5? I have a theme working fine with it in 2.3 but totally ignoring the 4th parameter of next_post_link and previous_post_link in 2.5.
Example of code that works in 2.3 but not 2.5 (the excluded category parameter is ignored in 2.5)...
previous_post_link('%link', '« ', FALSE, '1');
next_post_link('%link', '»', FALSE, '1');
basherdesigns
Member
Posted 5 years ago #
I had to use this code in
<?php if (is_home()) {query_posts($query_string . "&cat=-6,-4"); } ?>
Here's the post link
Good luck!
TylerMartin
Member
Posted 5 years ago #
I'm just wanting this for navigation, I have my queries the way I want them.
This is a problem with 2.5 not working the way the function is supposed to work according to the codex and previous versions. I'm surprised there are not more people running into this.
TylerMartin
Member
Posted 5 years ago #
TylerMartin
Member
Posted 5 years ago #
Filosofo found the problem in the WP 2.5 code and has a fix here:
http://trac.wordpress.org/ticket/6551
I guess this topic is resolved. But it will be more resolved if the fix makes it in soon with a WP 2.5 bug fix update. :)
phejster
Member
Posted 4 years ago #
I checked the link-template.php in wp-includes and it looks like Filosofo's fix went into 2.5.1, but I'm still having this problem. previous_post_link and next_post_link do not recognize category exclusion.
Here is my code:
<?php previous_post_link('%link', '%title', FALSE, '3'); ?>