Archived

This topic is now archived and is closed to further replies.

  • 0

How to make Postnav specific to category?

Question

Posted · Report post

I'm looking for a way to make the postnav area category specific, instead of showing posts from all categories. I've looked through wordpress.org and I have been unable to find the code that needs to be changed which I read would be in single.php. Could anyone help me figure out what I need to change?

Share this post


Link to post
Share on other sites

7 answers to this question

Posted · Report post

I seem to have figured it out, but if this is wrong or if there is another way, let me know. Here is what I've done in the sections directory for postnav section.php

<?php previous_post_link('%link', $link='%title', $in_same_cat = true); ?>
				<?php next_post_link('%link', $link='%title', $in_same_cat = true); ?>[/code]

1 person likes this

Share this post


Link to post
Share on other sites

Posted · Report post

Did you place this edited section inside Base Child Theme, or did you edit directly in PageLines Framework sections?

Share this post


Link to post
Share on other sites

Posted · Report post

I know nothing about a Base child theme, so I edited directly into the Pagelines framework sections directory, which I know means I will have to update with each new release and until I find out what the base child theme is...that will be fine.. HAHA I'm not new to wordpress, but I am to frameworks all together. Thus far Pagelines has been very nice to work with & learn.

Share this post


Link to post
Share on other sites

Posted · Report post

Thanks for the heads up, Catrina! I installed the base theme and copied the postnav section directory into the sections directory of the base theme.

Share this post


Link to post
Share on other sites

Posted · Report post

@parabased - thanks, thats what i was just looking for :)

 

Good to know someone else found the information useful!

Share this post


Link to post
Share on other sites

Posted · Report post

@parabased - thanks, thats what i was just looking for :)

1 person likes this

Share this post


Link to post
Share on other sites