Wordpress Themes - WP Forum at BFA
Click here to register or to donate.
Auto self-registration is not available here - far too many spammers. This forum has many, many backlinks and because of that there is an intense desire among spammers to drop their links here.

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

next/previous - keep it to current category


  #1  
Old Dec 16, 2009, 09:20 PM
sirabi
 
7 posts · Sep 2009
I would like my next/previous links on multi page and single page posts to be within a single category (the one containing the current post). How do I do this? There's not a single.php file.

Thanks!
  #2  
Old Dec 18, 2009, 04:52 AM
juggledad's Avatar
juggledad
 
23,682 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
Added an RFE to http://forum.bytesforall.com/showthread.php?t=3650
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #3  
Old Jan 8, 2010, 02:54 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 which category page the user comes from.

I'm using ATA 3.4.4 and WP 2.8.6

Hope this helps!
M-J

Last edited by juggledad; Jan 21, 2010 at 04:35 AM.
  #4  
Old Jan 8, 2010, 05:23 PM
joan
 
50 posts · Sep 2009
Brisbane, Qld, Aust
Using http://wordpress.org/extend/plugins/smarter-navigation/ works on two sites http://www.paperflame.com/content & http://www.enduro.nl but it has to be configured somehow with atahualpa and I'm not sure how. So far it's not working for me. I have installed the plugin and put <code><?php echo '<div class="newer">'; previous_post_smart();echo '</div>'; ?>
<?php echo '<div class="older">'; next_post_smart();echo '</div>'; ?></code> into ATA->CENTRE COL->THE LOOP, but if you look at http://travelhorizonstyle.com.au/cat...e-east/turkey/ and then click "Cappadocia & coastal-splendours" the next/prev is not showing all four posts (tours), ie (Taste of Turkey) is not displayed at all.

Last edited by joan; Jan 8, 2010 at 05:30 PM.
  #5  
Old Jan 17, 2010, 02:28 PM
Elenis
 
4 posts · Jan 2010
Frankfurt am Main
I was going to ask exactly the same question

I love Atahualpa so far, but keeping Next/Previous in the same category is important to me and I don't have any idea about how it can be done (with or without a plugin).
  #6  
Old Jan 17, 2010, 06:16 PM
chiara7's Avatar
chiara7
 
18 posts · Sep 2009
Budapest - Hungary
I had the same problem, I solved it with the following changes in bfa_next_previous_links.php (bold are the changes)

Code:
/* Next/Previous POST Links (on single post pages)
   in next_post_link "next" means newer posts
   Available parameters for $location: Top, Middle, Bottom. Default: Top  */

function bfa_next_previous_post_links($location = "Top") {

global $bfa_ata;

	if ( is_single() AND strpos($bfa_ata['location_single_next_prev'],$location) !== FALSE AND
	
    // don't display on WP Email pages
    intval(get_query_var('email')) != 1 )  {

		echo '<div class="navigation-'.strtolower($location).'">
		<div class="older' . ($bfa_ata['home_single_next_prev'] != '' ?
        '-home' : '') . '">';

		$bfa_ata['next_prev_orientation'] == 'Older Left, Newer Right' ? 
		previous_post_link('%link', '%title', 'yes', TRUE) : 
		next_post_link('%link', '%title', TRUE);

		echo ' &nbsp;</div>' . ($bfa_ata['home_single_next_prev'] != '' ?
        '<div class="home"><a href="' . $bfa_ata['get_option_home'] . '/">' .
        $bfa_ata['home_single_next_prev'] . '</a></div>' : '') .
		'<div class="newer' . ($bfa_ata['home_single_next_prev'] != '' ?
        '-home' : '') . '">&nbsp; ';

		$bfa_ata['next_prev_orientation'] == 'Older Left, Newer Right' ? 
		next_post_link('%link', '%title', TRUE) : 
		previous_post_link('%', '%title', 'yes', TRUE);

		echo '</div><div class="clearboth"></div></div>';

	}

}

sorry for my poor english........

Last edited by juggledad; Jan 21, 2010 at 04:35 AM.
  #7  
Old Feb 3, 2010, 02:08 PM
victorm
 
11 posts · Feb 2010
thank, Chiara - did not even think of this before, a great addition to some of my blogs.
  #8  
Old Aug 27, 2010, 01:21 AM
James Patrick
 
1 posts · Aug 2010
chiara7, Thanks for the php code, which eventually helped to solve my problem, that was a real pain for me!


____________________________
php chat for website
  #9  
Old Sep 30, 2010, 09:57 AM
esvl
 
16 posts · Sep 2010
France
With Atahualpa 3.5.3, there is an theme option for that purpose:
"Center Column" / "Next-Previous Navigation" / "New: Keep next/prev. links on SINGLE post pages to same post category?"
Unfortunatly, it doesn't work for me.

The links are not visible in the single post view, while I am locking a ast that another one of the same category.

Any idea ?

- Meantime, I have tested with a categery having more post, and in that case, no pb...
How to report a bug?

BTW, I very thank the team for this so great/configurable theme!!!

Last edited by esvl; Sep 30, 2010 at 10:01 AM. Reason: Bug found
  #10  
Old Sep 30, 2010, 06:47 PM
juggledad's Avatar
juggledad
 
23,682 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
what version of Atahualpa and WP?
What is the url?
How many categories do you have on each post?
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #11  
Old Oct 1, 2010, 02:28 AM
esvl
 
16 posts · Sep 2010
France
Hi juggledad

I am using ATA 3.5.3 and WP 3.0.1 (FR).
Option "Keep next/prev. links on SINGLE post pages to same post category?" is checked.
Posts have been imported from Joomla! with the related plugin.

The "badly-working" "archive of category" URL is here :
(there are 2 posts in this category and only this ones)
http://www.urlgone.com/2fcb2c/

Here is another "good-working" "archive of category" URL:
(there are 5 posts in this category and only this ones)
http://www.urlgone.com/4b65b0/

(
BTW, I would have LOVED being able to set the sorting order Next/Previous based based on URL (alphabetic order) instead of in chronologic order (or another mean to set the post order as I'd like)
)

Many thanks
Eric

Last edited by esvl; Oct 1, 2010 at 02:38 AM.
  #12  
Old Oct 1, 2010, 05:09 AM
juggledad's Avatar
juggledad
 
23,682 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
Ok, here is the problem as I see it.

The new option 'Keep next/prev. links on SINGLE post pages to same post category?' does work IF THERE IS ONE CATEGORY PER POST.

originally the next/previous navigation went from post to post, and now it will follow the FIRST CATEGORY ID associated with the post. Category ID's are assigned numerically in the order they are created - not alphabetically. So when you go to a post and there are five categories associated with it there is no way to tell which category line to follow.

so if you want this to work, make sure there is only one category assigned to the post.
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #13  
Old Oct 1, 2010, 07:45 AM
esvl
 
16 posts · Sep 2010
France
This is what i also suspected...
And your information is good to know.
But actually this is not the case in my two exemples, all the post belong to a single category... There must be something else.
  #14  
Old Oct 1, 2010, 08:17 AM
juggledad's Avatar
juggledad
 
23,682 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
what do you have set at ato->Next/Previous Navigation for '"Newer Post" link on SINGLE post pages' and '"Older Post" link on SINGLE post pages'?
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #15  
Old Oct 1, 2010, 09:02 AM
esvl
 
16 posts · Sep 2010
France
I have left the default values (&laquo; %link)
We can see them in action through the second link i posted above.

I Have tried to leave in the second link/category only 2 posts.
And with only two posts, it works fine too. So the problèm i have with my first link does'nt come from the nb of posts.

Last edited by esvl; Oct 1, 2010 at 09:19 AM.

Bookmarks

Tags
categories, next/previous, next/previous navigation

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
Can the next/previous post navigation be constrained to the current category ? 3ukman Header configuration & styling 1 Aug 29, 2009 09:14 AM
next and previous navigation in the consulted category lkjc Page & Category Menu Bars 4 Jun 1, 2009 05:25 PM
Tagline: Can I make it the current date? jockoe Header configuration & styling 3 Feb 24, 2009 01:41 PM
Current state of Bugs/Fixes Flynn New Versions, & Updating 13 Dec 19, 2008 09:09 AM


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


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