Wordpress Themes - WP Forum at BFA
There will be no more development for Atahualpa (or any other theme), and no support. Also no new registrations. I turned off the donation system. I may turn the forum to read only if it gets abused for spam. Unfortunately I have no time for the forum or the themes. Thanks a lot to the people who helped in all these years, especially Larry and of course: Paul. Take care and stay healthy -- Flynn, Atahualpa developer, Sep 2021

Wordpress Themes - WP Forum at BFA » WordPress Themes » Atahualpa 3 Wordpress theme » Center area post/pages » Excerpts, Read more, Pagination »

Next/Previous navigation question


  #1  
Old Nov 5, 2009, 10:18 AM
lmilesw's Avatar
lmilesw
 
10,176 posts · Jul 2009
Central New York State USA
I'm using the standard categories widget. When I click on the category it of course takes me to a listing of posts in that cat. When I click on the title to open the post the next/previous links at the top aren't limited to the particular category I chose. Is there a way to constrain the next/previous to the category I selected?
  #2  
Old Nov 5, 2009, 01:09 PM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
The theme is using the standard WordPress nav code (wp-inlcudes/link-template.php)

What this measn is that when you finally get to a single POST page, Wordpress uses teh next/previous POSTS in the database, it's not keeping track of the category.

You might be able to hack the link-template.php code and change how it is getting the next and previous links
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #3  
Old Nov 6, 2009, 05:26 AM
Nickp
 
7 posts · Nov 2009
I wanted to implement a Next\Previous In Category link to replace the default Next/Previous links on my single post pages. Rather than change the wp function, I made the following changes in the theme:

In the bfa_next_previous_links.php code:
Find this function:
Code:
function bfa_next_previous_post_links($location = "Top")
Then in the two places where this code appears:
Code:
previous_post_link($bfa_ata['single_next_prev_older']) : 
next_post_link($bfa_ata['single_next_prev_newer']);
Replace it with this code:
Code:
previous_post_link($bfa_ata['single_next_prev_older'],'%title',true) : 
next_post_link($bfa_ata['single_next_prev_newer'],'%title',true);
The 'true' argument is the one that wp interprets to limit the navigation to the "current" category.

This seems to work ok in a blog where each post is associated with only one category. I haven't tested the behaviour where each post exists in multiple categories. I would hope there would be some persistence of category (but I'm not going to rely on it).

Nor have I thought too hard yet about pagination of posts so we're definitely into quick fix territory with this one!!

Can anyone see any problems with this approach?
  #4  
Old Jan 8, 2010, 03:52 PM
mjrouleau
 
4 posts · Dec 2009
This plugin works beautifully, even with posts belonging to more than one category:
http://wordpress.org/extend/plugins/smarter-navigation/

Somehow the plugin detects from wich category page the user comes from.

I'm using ATA 3.4.4 and WP 2.8.6

Hope this helps!
M-J
  #5  
Old Feb 3, 2010, 03:24 PM
victorm
 
11 posts · Feb 2010
nickp, I'd like to try that - my coder will look at it. we have this issue with posts which are totally unrelated to other categories than their own (keep Google from thinking we are interlinking anything is important for authority). my only concern is with Flynn's next version - you need to fork and track these changes yourself, which I don't like too much.
  #6  
Old Apr 10, 2010, 12:05 AM
rottwlrmom
 
15 posts · Apr 2010
I tried it and LOVED it! So easy to use!

Bookmarks



Similar Threads
Thread Thread Starter Forum Replies Last Post
Filter next/previous navigation by category garyrw Post-Kicker, -Byline & -Footer 13 Jan 8, 2010 04:28 PM
[SOLVED] How to style the Previous/Next Navigation links Fux Header configuration & styling 6 Aug 16, 2009 09:41 AM
[SOLVED] Preserving next/previous navigation with query_posts leer Excerpts, Read more, Pagination 1 Aug 5, 2009 09:01 AM
[SOLVED] How do I move next/previous navigation to the bottom of the post evany Post-Kicker, -Byline & -Footer 1 Jun 7, 2009 07:41 AM
next and previous navigation in the consulted category lkjc Page & Category Menu Bars 4 Jun 1, 2009 06:25 PM


All times are GMT -6. The time now is 11:11 PM.


Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.