Forums

[resolved] My category navigation is set to TRUE, but it's still pulling in all posts (5 posts)

  1. hazelbug
    Member
    Posted 5 months ago #

    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
    http://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>
  2. deepbevel
    Member
    Posted 5 months ago #

    You might try Smarter Navigation, get's the category by the referring post, has always worked for me.

  3. hazelbug
    Member
    Posted 4 months ago #

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

  4. hazelbug
    Member
    Posted 4 months ago #

    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.

  5. deepbevel
    Member
    Posted 4 months ago #

    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.

Reply

You must log in to post.

About this Topic