ThemeShaper Forums » Thematic

[closed]

nav-below alphabetically sorted

(5 posts)
  • Started 2 years ago by CaliMero
  • Latest reply from CaliMero
  • This topic is resolved
  1. CaliMero
    Member

    Hi all together,
    I am quite new to programming, so I appologize in advance if I oversee something here.
    Thematic is just a great theme and I am facinated of all the posibillities that come along with it.

    At the moment I am programming an category archive with a glossary style alphobetic order.
    My problem at the moment is, that the nav-below on post page is displaying the next post sorted by date, instead of title.
    I am stuck right now, but am quite sure I'm missing something here.

    this is the code I got so far with help of this great forum:

    function childtheme_next_post_link_args($args) {
    		if (in_category('6'))
    		{
    				$args = array (	'format'				=> '%link',
    							    'link'					=> '%title <span class="meta-nav">&raquo;</span>',
    								'in_same_cat'			=> TRUE,
    								'excluded_categories'	=> '',
    								'orderby'			   	=> 'title',
    								'order'					=> 'asc');
    
    		}
    		else
    		{
    				$args = array (	'format'              => '%link',
    								'link'                => '%title <span class="meta-nav">&raquo;</span>',
    								'in_same_cat'         => FALSE,
    								'excluded_categories' => '6'); //lexicon id
    		}
    		return $args;
    }
    add_filter('thematic_next_post_link_args', 'childtheme_next_post_link_args');

    Thank you very much in advance an.

    Posted 2 years ago #
  2. nice effort, but according to the codex:
    http://codex.wordpress.org/Function_Reference/next_post_link

    next post link does not support 'orderby' nor 'order' parameters so that will never work as you intend. i think you're looking at writing some custom functions here.

    Posted 2 years ago #
  3. CaliMero
    Member

    Thank you soo much,
    I already feared that this was coming towards me.
    Thanks a lot though;

    Do you have any suggestions on where to start here?

    Thanks a lot.

    Posted 2 years ago #
  4. let me google that for you:

    http://wordpress.org/extend/plugins/ambrosite-nextprevious-post-link-plus/

    Posted 2 years ago #
  5. CaliMero
    Member

    ups... that was quick and especially less complicated way than I thought...
    I appologize for missing that.
    Thank you very much.

    Posted 2 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.