Jump to content


Photo

Previous/Next navigation - How can you make it stick within a category?


  • Please log in to reply
6 replies to this topic

#1 michaelchristonsayerscom

michaelchristonsayerscom

    Member

  • Members
  • PipPip
  • 13 posts

Posted 25 February 2011 - 07:07 PM

Hi there (Third and final question of the day!) Is there a way in iBlogPro to make the next/previous navigation at the top of the page stick to specific category? So if user was in category "X" then the next/previous navigation would cycle through category "X" posts only. If I was in category "Y" it would cycle through category "Y" posts only. Any thoughts? Thanks in advance again (really digging the theme... and making great progress on using it as a theme for membership site... Just need to get these things sorted so I can truly be rocking'n'rolling!) AS

#2 cmunns

cmunns

    Advocate

  • Members

  • 6537 posts
  • Country: Country Flag

Posted 25 February 2011 - 09:26 PM

look for functions_body.php and search for this: ` function pagelines_postnav(){?>

#3 michaelchristonsayerscom

michaelchristonsayerscom

    Member

  • Members
  • PipPip
  • 13 posts

Posted 26 February 2011 - 02:09 PM

Hi there - Thanks for the answer ...but that didn't seem to make any difference :-( If I navigate to a post in category "X" and I then use the prev/next navigation at the top of the page.. then as soon as it gets to the end of the posts within that category the prev/next navigation just goes onto posts in the next category... Any other ideas? Thanks in advance, AS

#4 catrina

catrina

    Advocate

  • Members
  • 12345 posts
  • LocationCalifornia
  • Country: Country Flag

Posted 26 February 2011 - 07:41 PM

Try replacing
 <?php previous_post_link('%link', TRUE) ?>
and
 <?php next_post_link('%link', TRUE) ?>
with these codes:

`



`
Replace
 EXCLUDEDCATEGORYID#HERE
with the category ID numbers for the categories you want excluded. (Separate the category ID numbers with commas like so: 12, 6, 15... etc.)

#5 michaelchristonsayerscom

michaelchristonsayerscom

    Member

  • Members
  • PipPip
  • 13 posts

Posted 27 February 2011 - 12:11 PM

Thanks for the suggestion Catrina, however regrettably that won't work for me either as I need the next/prev to work on all categories... So excluding a category would cause a problem... In other words, when in category "X" next/prev works within category "X" posts only... but when category "Y" next/prev works within category "Y" posts only. Being more a user than super-techie, the ability to navigate like this within a single category seems quite intuitive... so it would be great to be able to make it happen. :) Thanks again for the suggestion. AS

#6 catrina

catrina

    Advocate

  • Members
  • 12345 posts
  • LocationCalifornia
  • Country: Country Flag

Posted 27 February 2011 - 07:01 PM

I'm not quite sure why Adam's suggestion wouldn't work. It is a suggested function as shown in the Codex here: http://codex.wordpre...n_Same_Category

#7 kastelic

kastelic

    Advocate

  • Members

  • 3081 posts
  • Country: Country Flag

Posted 23 March 2011 - 04:29 PM

I think you are missing the second parameter which I have used the default for below:
 next_post_link('%link', '%title', TRUE)