• Resolved hazelbug

    (@hazelbug)


    I have 3 categories with templates for the header, etc set for different areas on the site. This works fine except for the archives.

    I created 2 different single post templates (using a plug in) bc these different areas of different headers and sidebars.

    But once you are looking at the single pages of these posts, the navigation doesn’t just do the same category. It pulls from all posts.

    I set the category to true. I tried to add an exclude category, but I am not sure of the correct way to write the code.

    Any help?

    Here is a link to one of the single posts
    https://www.vividsolutionsdc.com/newsite/la-femme-davine/

    Here is the code for the post nav

    <div class="navigation">
    		<div class="alignleft"> <?php next_post_link($format='%link &raquo;', $link='%title', $in_same_cat = true); ?></div>
    			<div class="alignright"><?php previous_post_link($format='%link &raquo;', $link='%title', $in_same_cat = true); ?></div>
    		</div>

Viewing 4 replies - 1 through 4 (of 4 total)
  • You might try Smarter Navigation, get’s the category by the referring post, has always worked for me.

    Thread Starter hazelbug

    (@hazelbug)

    Thanks. I tried it and it still pulled the other category in… any other ideas?

    Thread Starter hazelbug

    (@hazelbug)

    Oh, I think I figured out the problem! Because I am using different single.php files, I missed marking some of them specifically instead of default when using the single page plug in for the posts. Then it was also pulling in the default.

    I’ve been strugging with it myself, smarter nav doesn’t seem towork in query)posts, so I’ve been using code to pull related posts as a list or thumbnail row from the current category instead.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘My category navigation is set to TRUE, but it's still pulling in all posts’ is closed to new replies.