Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Post-Kicker, -Byline & -Footer (http://forum.bytesforall.com/forumdisplay.php?f=17)
-   -   [SOLVED] Post navigation alphabetically (http://forum.bytesforall.com/showthread.php?t=16150)

fullmetalgirl Dec 2, 2011 02:00 PM

[SOLVED] Post navigation alphabetically
 
Al my posts are alphabetically, now i would like to see the navigation in single post pages to show alphabetically aswell.

Is there a way?
note that not all posts are in the same catagorie, but even then they should be alphabetically.

Help would be much appreciated :)

juggledad Dec 2, 2011 05:11 PM

Be default, posts show in the order they were published. Have you used a page template to make changes?
What version of Atahualpa and WP?
What is the url?

lmilesw Dec 2, 2011 07:15 PM

There are plugins that will display posts alphabetically as one of the options. Link Category Posts is the first that comes to mind.

fullmetalgirl Dec 2, 2011 11:35 PM

I used:
Post Sorting Reloaded plugin to alphabetically order posts in categorie pages, I'm also using link category post to get lists of all my categories alphabetically on a "view all post" page.
but the navigation on 1 post on page pages is still not alphabetically.

I've got the most recent atahualpa and wp and i didn't change the page template (as far as i can remember). Here's an url that shows what im talking about:
http://www.bushcraftvereniging.nl/wiki/pemmican/

You see the post "Pemmican"
The next is trapper and the previous is bannocks.. but there should be a lot between the b and p.
(note that this page was only created 3/4 days go and is still very empty)

lmilesw Dec 3, 2011 06:04 AM

The next previous links are still based on chronological order. I just did a Google search for "wordpress next previous alphabetical" and came up with a link that sent me to this plugin which might be what you need.

Often a quick Google search or a search at wordpress.org will help with things along these lines.

fullmetalgirl Dec 3, 2011 06:57 AM

To make that work i need to find the "next_post_link" and "previous_post_link " tags...
it said to be in single.php but i can't seem to find it?

this is what i need to put "somewhere" i guess:
HTML Code:

<?php next_post_link_plus( array('order_by' => 'post_title') ); ?>

juggledad Dec 3, 2011 07:17 AM

Atahualpa sets up the next/previous links via calls to the wordpress functions 'next_post_link' and 'previous_post_link' in bfa_nexr_previous_links.php

Note there are several places it calls them based on the type of page and it uses the options from ato->Next/Previous Navigation settings

fullmetalgirl Dec 3, 2011 07:25 AM

The single post pages are the only ones that mather to me,

HTML 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, $homeURL;

        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="clearfix navigation-'.strtolower($location).'">
                <div class="older' . ($bfa_ata['home_single_next_prev'] != '' ?
        '-home' : '') . '"
>
';

                if ($bfa_ata['next_prev_orientation'] == 'Older Left, Newer Right') {
                        if($bfa_ata['single_next_prev_same_cat'] == "Yes") {
                                previous_post_link($bfa_ata['single_next_prev_older'], '%title', TRUE);
                        } else {
                                previous_post_link($bfa_ata['single_next_prev_older']);
                        }
                } else {
                        if($bfa_ata['single_next_prev_same_cat'] == "Yes") { 
                                next_post_link($bfa_ata['single_next_prev_newer'], '%title', TRUE);
                        } else {
                                next_post_link($bfa_ata['single_next_prev_newer']);
                        }
                }
               
                echo ' &nbsp;</div>';
                if ($bfa_ata['home_single_next_prev'] != '') {
                        echo '<div class="home"><a href="' . $homeURL . '/">' .
                        $bfa_ata['home_single_next_prev'] . '</a></div>';
                }
                echo '<div class="newer';
                if ($bfa_ata['home_single_next_prev'] != '') {
                        echo '-home';
                }
                echo '"
>
&nbsp; ';

                if ($bfa_ata['next_prev_orientation'] == 'Older Left, Newer Right') {
                        if($bfa_ata['single_next_prev_same_cat'] == "Yes") {
                                next_post_link($bfa_ata['single_next_prev_newer'], '%title', TRUE);
                        } else {
                                next_post_link($bfa_ata['single_next_prev_newer']);
                        }
                } else {
                        if($bfa_ata['single_next_prev_same_cat'] == "Yes") {
                                previous_post_link($bfa_ata['single_next_prev_older'], '%title', TRUE);
                        } else {
                                previous_post_link($bfa_ata['single_next_prev_older']);
                        }
                }

                echo '</div></div>';
        }
}

Is the code,

changing
HTML Code:

previous_post_link($bfa_ata['single_next_prev_older']);
to
HTML Code:

previous_post_link_plus( array('order_by' => 'post_title') );
doesnt seem to work.

juggledad Dec 3, 2011 08:04 AM

Quote:

previous_post_link_plus
what widget is that from?

juggledad Dec 3, 2011 08:13 AM

Quote:

previous_post_link_plus
what widget is that from?

I installed 'Next/Previous Post Link Plus for WordPress' ad it worked for me - make sure you disable andy caching plugins you have.

fullmetalgirl Dec 3, 2011 08:13 AM

Quote:

Originally Posted by lmilesw (Post 76879)
The next previous links are still based on chronological order. I just did a Google search for "wordpress next previous alphabetical" and came up with a link that sent me to this plugin which might be what you need.

Often a quick Google search or a search at wordpress.org will help with things along these lines.

It's from the above suggested plugin.
If there's a way to not use this plugin i would prefere it, but using it is hard enough aswell.
what would be caching plugins?

juggledad Dec 3, 2011 10:22 AM

That is the plugin I tried it with and it worked fine.
It look like you DO NOT have a caching plugin active (like w3 total cache)

fullmetalgirl Dec 3, 2011 02:31 PM

I simply got the plugin by searching for it at wp-admin panel and letting wp install it. Install was succesfull, But nothing happened. Do i need to do anything extra?

juggledad Dec 3, 2011 03:18 PM

Well you have to make the changes to bfa_nexr_previous_links.php and make sure to make them to the next AND previous

fullmetalgirl Dec 3, 2011 03:29 PM

I tried that the way i explained a few posts earlier.. but i think im doing something wrong?
is it possible to show me what i need to replace with what? Or maybe show me what you did?

juggledad Dec 3, 2011 06:47 PM

Here is what I changed you can see the commented out lines
HTML 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, $homeURL;

        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="clearfix navigation-'.strtolower($location).'">
                <div class="older' . ($bfa_ata['home_single_next_prev'] != '' ?
        '-home' : '') . '"
>
';

                if ($bfa_ata['next_prev_orientation'] == 'Older Left, Newer Right') {
                        if($bfa_ata['single_next_prev_same_cat'] == "Yes") {
previous_post_link_plus( array('order_by' => 'post_title') );
//                                previous_post_link($bfa_ata['single_next_prev_older'], '%title', TRUE);
                        } else {
previous_post_link_plus( array('order_by' => 'post_title') );
//                                previous_post_link($bfa_ata['single_next_prev_older']);
                        }
                } else {
                        if($bfa_ata['single_next_prev_same_cat'] == "Yes") {
next_post_link_plus( array('order_by' => 'post_title') );                                //next_post_link($bfa_ata['single_next_prev_newer'], '%title', TRUE);
                        } else {
next_post_link_plus( array('order_by' => 'post_title') );                                //next_post_link($bfa_ata['single_next_prev_newer']);
                        }
                }
               
                echo ' &nbsp;</div>';
                if ($bfa_ata['home_single_next_prev'] != '') {
                        echo '<div class="home"><a href="' . $homeURL . '/">' .
                        $bfa_ata['home_single_next_prev'] . '</a></div>';
                }
                echo '<div class="newer';
                if ($bfa_ata['home_single_next_prev'] != '') {
                        echo '-home';
                }
                echo '"
>
&nbsp; ';

                if ($bfa_ata['next_prev_orientation'] == 'Older Left, Newer Right') {
                        if($bfa_ata['single_next_prev_same_cat'] == "Yes") {
next_post_link_plus( array('order_by' => 'post_title') );                                //next_post_link($bfa_ata['single_next_prev_newer'], '%title', TRUE);
                        } else {
next_post_link_plus( array('order_by' => 'post_title') );                                //next_post_link($bfa_ata['single_next_prev_newer']);
                        }
                } else {
                        if($bfa_ata['single_next_prev_same_cat'] == "Yes") {
previous_post_link_plus( array('order_by' => 'post_title') );
//previous_post_link($bfa_ata['single_next_prev_older'], '%title', TRUE);
                        } else {
previous_post_link_plus( array('order_by' => 'post_title') );
//                                previous_post_link($bfa_ata['single_next_prev_older']);
                        }
                }

                echo '</div></div>';
        }
}

/* Next/Previous Comments Links.


fullmetalgirl Dec 4, 2011 01:46 AM

I copied past yours and this is what i got:

Quote:

Fatal error: Call to undefined function next_post_link_plus() in /home/******/domains/bushcraftvereniging.nl/public_html/wiki/wp-content/themes/atahualpa/functions/bfa_next_previous_links.php on line 111

fullmetalgirl Dec 4, 2011 01:53 AM

I found the problem!

Thank you very much!!!
I had a wrong version of the plugin installed. It seems to work now!

thanks for putting up with me.


All times are GMT -6. The time now is 04:34 AM.

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