Tagged: navigation, Portfolio, previous / next
-
AuthorPosts
-
April 1, 2015 at 2:07 pm #421882
Using Enfold’s portfolio feature I would like the left and right arrows to display the pages in the same order they were published in…
Currently the left arrow seems to show NEXT, and the right arrow appears to show PREVIOUS.
Is there a way to swop them around and make them list by published order?
This is an example of the published order: http://levickjorgensen.com/portfolio/
Click on the first image, you would expect the arrow to be on the right, and show the next one in the same order as the portfolio page…
I hope this makes sense!
April 2, 2015 at 4:44 pm #422591Hi ColinWalton!
Open up /enfold/functions-enfold.php and change lines 395 – 403 from this.
{ $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']); }
To this.
{ $entries['next'] = get_previous_post($settings['same_category'], $settings['excluded_terms'], $settings['taxonomy']); $entries['prev'] = get_next_post($settings['same_category'], $settings['excluded_terms'], $settings['taxonomy']); } else { $entries['next'] = get_previous_post($settings['same_category']); $entries['prev'] = get_next_post($settings['same_category']); }
Best regards,
ElliottApril 2, 2015 at 6:59 pm #422719Brilliant thank you!
One last request though…
Could it loop round? so that there are ALWAYS buttons on BOTH sides. So that you never get to a point when you can’t click on next?Sorry to be a pain!
April 3, 2015 at 6:12 pm #423207Hey!
It’s possible but it would take a lot of time and code to implement so it would have to be considered custom work for now. You could create a feature request here, https://kriesi.at/support/enfold-feature-requests/, and if it gets enough interest we may see something get added in a future update.
Regards,
ElliottApril 7, 2015 at 12:33 pm #424594Hiya, no worries. I was thinking it would be possible to write an if / else code that displayed the first one of the portfolios if there no others to display?
Now I know where to look I can have a go myself.
Thanks again!
-
AuthorPosts
- The topic ‘Configuring Previous / Next buttons for Portfolio items’ is closed to new replies.