Jump to content


Photo
- - - - -

How to make Postnav specific to category?


Best Answer The Farside† , 14 August 2012 - 03:06 AM

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

 <span class="previous"><?php previous_post_link('%link', $link='%title', $in_same_cat = true); ?></span>
				<span class="next"><?php next_post_link('%link', $link='%title', $in_same_cat = true); ?></span>
Go to the full post


This topic has been archived. This means that you cannot reply to this topic.
7 replies to this topic

#1 The Farside†

The Farside

    Member

  • DMS Subscriber†
  • 15 posts

Posted 14 August 2012 - 01:58 AM

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?

#2 The Farside†

The Farside

    Member

  • DMS Subscriber†
  • 15 posts

Posted 14 August 2012 - 03:06 AM   Best Answer

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

Please Login or Register to see this Hidden Content



#3 Rob

Rob

    One Smart Egg

  • Members
  • 13575 posts

Posted 14 August 2012 - 04:51 AM

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

#4 The Farside†

The Farside

    Member

  • DMS Subscriber†
  • 15 posts

Posted 14 August 2012 - 03:22 PM

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.

#5 catrina

catrina

    Advocate

  • Members
  • 12345 posts

Posted 14 August 2012 - 03:40 PM

I highly recommend installing the base theme. It'll save you some trouble! For reference:

Please Login or Register to see this Hidden Content



#6 The Farside†

The Farside

    Member

  • DMS Subscriber†
  • 15 posts

Posted 14 August 2012 - 04:00 PM

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.

#7 basmati

basmati

    Advocate

  • Members
  • 264 posts

Posted 12 February 2013 - 01:36 PM

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



#8 The Farside†

The Farside

    Member

  • DMS Subscriber†
  • 15 posts

Posted 11 April 2013 - 08:43 PM

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

 

Good to know someone else found the information useful!