Wordpress Themes - WP Forum at BFA
Click Here To DONATE! Support the theme development, get more attention and additional benefits based on your donation level. Your forum name will be highlighted.

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

Next/Previous navigation question


Build custom WP THEMES, without
coding.
Click here for THEMEFRAME

From the author of Atahualpa, the #1 most
downloaded (700,000+) theme @ wordpress.org
  #1  
Old Nov 5, 2009, 09:18 AM
lmilesw's Avatar
lmilesw
 
10,097 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, 12:09 PM
juggledad's Avatar
juggledad
 
22,244 posts · Mar 2009
OSX 10.8.5 WP 3.8.x Atahualpa 3.7.x Safari 6.x Firefox 25 XP
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, 04: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, 02: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, 02: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 9, 2010, 11:05 PM
rottwlrmom
 
15 posts · Apr 2010
I tried it and LOVED it! So easy to use!

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Filter next/previous navigation by category garyrw Post-Kicker, -Byline & -Footer 13 Jan 8, 2010 03:28 PM
[SOLVED] How to style the Previous/Next Navigation links Fux Header configuration & styling 6 Aug 16, 2009 08:41 AM
[SOLVED] Preserving next/previous navigation with query_posts leer Excerpts, Read more, Pagination 1 Aug 5, 2009 08: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 06:41 AM
next and previous navigation in the consulted category lkjc Page & Category Menu Bars 4 Jun 1, 2009 05:25 PM


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


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