|
#1
Dec 16, 2009, 09:20 PM
|
|
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
Dec 18, 2009, 04:52 AM
|
|
|
|
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
|
|
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
|
#3
Jan 8, 2010, 02:54 PM
|
|
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.
|
#5
Jan 17, 2010, 02:28 PM
|
|
|
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
Jan 17, 2010, 06:16 PM
|
|
|
|
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 ' </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' : '') . '"> ';
$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
Feb 3, 2010, 02:08 PM
|
|
thank, Chiara - did not even think of this before, a great addition to some of my blogs.
|
#8
Aug 27, 2010, 01:21 AM
|
|
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
Sep 30, 2010, 09:57 AM
|
|
|
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
Sep 30, 2010, 06:47 PM
|
|
|
|
23,765 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
Oct 1, 2010, 02:28 AM
|
|
|
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
Oct 1, 2010, 05:09 AM
|
|
|
|
23,765 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
Oct 1, 2010, 07:45 AM
|
|
|
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
Oct 1, 2010, 08:17 AM
|
|
|
|
23,765 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
Oct 1, 2010, 09:02 AM
|
|
|
16 posts · Sep 2010
France
|
|
I have left the default values (« %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.
|
Thread Tools |
Search this Thread |
|
|
Display Modes |
Linear Mode
|
|