WordPress.org

Ready to get started?Download WordPress

Forums

Smarter Navigation
[resolved] How to add to my template? (2 posts)

  1. RoYeti
    Member
    Posted 2 years ago #

    Hy. I use the arjuna template (http://wordpress.org/extend/themes/arjuna-x ). In the single.php i have:
    <?php arjuna_get_post_pagination(__('Previous Page', 'Arjuna'), __('Next Page', 'Arjuna'));?>. In the functions.php file i have:

    function arjuna_get_previous_post_link($label) {
    
    	$post = get_adjacent_post(false, '', true);
    
    	if (!$post) return;
    
    	echo '<a href="'.get_permalink($post).'" rel="prev" class="newer"><span>'.$label.'</span></a>';
    
    }

    What and where to change to make it work? Thank you.

    http://wordpress.org/extend/plugins/smarter-navigation/

  2. scribu
    Member
    Plugin Author

    Posted 2 years ago #

    I suppose you could just replace get_adjacent_post(false, '', true); with get_adjacent_id_smart(false);

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic