-
AuthorPosts
-
May 7, 2015 at 6:41 am #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
DarrylMay 7, 2015 at 9:33 pm #441254Hi 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,
ElliottMay 8, 2015 at 4:10 am #441349Excellent, thanks Elliot. Is there anything I can do with this to move it into the child functions file?
cheers
DarrylMay 8, 2015 at 8:54 pm #441768Hi!
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,
ElliottMay 11, 2015 at 2:22 am #442170Thank you Elliot. This is so much better, anything in the child file is better, much appreciated.
cheers
DarrylMay 11, 2015 at 10:54 am #442348May 12, 2015 at 12:42 am #442753Thanks 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 -
AuthorPosts
- The topic ‘Reverse the order of the blog post side flyout tabs’ is closed to new replies.