Multiple categories & next_post_link
-
Hello all.
Still having a big problem sorting out this conundrum.
I’m developing my site (https://www.lewisheriz.com) locally using MAMP. Currently I’m adding posts to the subcategory Personal under the main category Work.
If you navigate to the Client section under Work, you can see how the browsing system works: pieces under Client are listed down the side, and there’s a prev/next section in the top right to scroll through them.
The problem I’m having is that as soon as I include posts under the second subcategory Personal, the next/prev link reads them too, positioning them chronologically. This means that the browsing logic is broken; it takes you to the Personal section, changing the sidebar contents and confusing the system.
Is there a way round this? Either as an edit to the ‘next_post_link’/’prev_post_link’ functions, or using a different hierarchical system?
Ideally, I need a way of forcing next_post_link to read only posts in the subcategory. But after extensive searches (and asking on here) there seems to be no solution to this.
I’m flummoxed.
It is made even more of a problem when posts include extra categories – I’m putting each piece into a ‘Posters’ or ‘Music Products’ etc category, with a view to providing other ways of searching/browsing work. This may also confuse the system.
Moshu – I noticed you have something similar on your site? Did you change the code/use a plugin, or is it really my set-up that’s the problem?
On top of this, browser caches and database updates seem to make the issue even harder to test – FF and Opera display the information differently depending on whether I’m logged in or not, for instance. It’s a bit of a nightmare
ANY help regarding any of this massively appreciated, as always.
- The topic ‘Multiple categories & next_post_link’ is closed to new replies.