Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1011939

    Hi,

    On the page (first link in private content) I have post navigation but I want to reverse the post nav arrows so the left arrow navigates to where the right arrow navigates now. Like in the order you see the items on the second link in private content.
    How can I achieve this in my child theme?

    #1011949

    Hey,

    Please add following code to bottom of functions.php file in Appearance > Editor

    add_filter('avia_post_nav_entries', 'avia_post_nav_entries_mod');
    function avia_post_nav_entries_mod($entries, $settings)
    {
      if(is_singular()) {
        $entries['prev'] = get_previous_post($settings['same_category'], $settings['excluded_terms'], 'portfolio_entries');
        $entries['next'] = get_next_post($settings['same_category'], $settings['excluded_terms'], 'portfolio_entries');
      }
      return $settings;
    }

    Best regards,
    Yigit

    #1012035

    This doesn’t work for me. The post navigation now disappeared

    #1012330

    Hi,

    Please try this code instead:

    
    add_filter( 'avia_post_nav_entries', 'enfold_customization_postnav', 10, 2); 
    function enfold_customization_postnav($entries, $settings)
    {
    	$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;
    }
    

    If it doesn’t work please create me an admin account and I’ll look into it.

    Best regards,
    Peter

    #1012343

    Thanks mate! This works perfect!

    #1012346

    Hey!
    Great, glad we could help you :)

    Regards,
    Peter

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