Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #1176164

    I would like to know if I can swap the post navigation on the right and left side of the screen? The portfolio items are currently set to descending order, but when I view them on screen, I should be clicking to the right to go back in history. As it appears now, I click on the left which should be taking me forward.

    For example:

    When I click on Air Margaritaville, the next post is Starbucks, which is located to the right. But, the navigation is on the left. Any help will be greatly appreciated.

    #1176552

    Hey tsmalling,

    Thank you for the inquiry.

    Using the following filter in the functions.php file should reverse the posts navigation.

    
    add_filter( 'avia_post_nav_entries', 'enfold_customization_postnav', 10, 2); 
    function enfold_customization_postnav($entries, $settings)
    {
    	if($settings['type'] == 'portfolio')
    	{
    		$settings['same_category'] = true;
    
    		$entries['prev'] = get_next_post($settings['same_category'], $settings['excluded_terms'], $settings['taxonomy']);
    		$entries['next'] = get_previous_post($settings['same_category'], $settings['excluded_terms'], $settings['taxonomy']);
    	}
    
        return $entries;
    }

    Related thread:

    // https://kriesi.at/support/topic/previous-next-buttons-only-same-category/#post-986083

    Best regards,
    Ismael

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.