Update
I have added an All category and added each post not in the excluded category to this category. This temporarily fixes the problem with the navigation gaps.
Original Post
Something is very wrong with the WordPress template tags previous_posts_link and next_post_link. Theoretically passing the arguments $in_same_cat=false and $excluded_categories='5' would generate links that skip posts in category with id 5 and include posts from all other categories in the selection process.
As this site currently demonstrates, category 5 is indeed excluded. However, when a category 5 post would be the next or previous one, no link is displayed. A dead end. Unless…the post that follows is from the same category as the current post, then a link is displayed.
Digging around in the /wp-content/template-functions-links.php and hardcoding the queries still does not produce the right results. Or maybe I am just missing something. I am tired, I should go sleep. I hope the next update fixes this mess. Does trac require a login?
Leave a reaction
Keep it decent and to the point.