Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #440767

    Hi Enfold users

    In the single page post view, there are flyout tabs on the left and right sides of the page.

    By default the left tab shows earlier posts. The right tab goes forth to the later posts.

    Does anyone know of a way I can switch to reverse this effect?

    That is, the left tab to instead go to later posts, and the right tab to go to earlier posts?

    cheers
    Darryl

    #441254

    Hi itchybrain!

    In the functions-enfold.php file around line 400 you should see this.

    if(version_compare($settings['wpversion'], '3.8', '>=' ))
    {
    	$entries['prev'] = get_previous_post($settings['same_category'], $settings['excluded_terms'], $settings['taxonomy']);
    	$entries['next'] = get_next_post($settings['same_category'], $settings['excluded_terms'], $settings['taxonomy']);
    }
    else
    {
    	$entries['prev'] = get_previous_post($settings['same_category']);
    	$entries['next'] = get_next_post($settings['same_category']);
    }
    

    Try changing it to this.

    if(version_compare($settings['wpversion'], '3.8', '>=' ))
    {
    	$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']);
    }
    else
    {
    	$entries['prev'] = get_next_post($settings['same_category']);
    	$entries['next'] = get_previous_post($settings['same_category']);
    }
    

    Best regards,
    Elliott

    #441349

    Excellent, thanks Elliot. Is there anything I can do with this to move it into the child functions file?
    cheers
    Darryl

    #441768

    Hi!

    Try this out.

    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']);
    	$entries['next'] = get_previous_post($settings['same_category']);
    	return $entries;
    }

    Regards,
    Elliott

    #442170

    Thank you Elliot. This is so much better, anything in the child file is better, much appreciated.
    cheers
    Darryl

    #442348

    Hey!

    Great, glad we could help :)

    Best regards,
    Rikard

    #442753

    Thanks Rikard, it’s always much better with the child theme solution. Most times I also see your staff recommending the child solution, so perhaps that can be the first solution offered each time?
    In any case, your support is better than any theme provider I have ever used.
    cheers
    Darryl

Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘Reverse the order of the blog post side flyout tabs’ is closed to new replies.