
-
AuthorPosts
-
June 24, 2025 at 8:23 pm #1485850
I find the side arrows for the navigation are working in reverse order here:
https://anthonyi34.sg-host.com/portfolio-item/boulder-garden/
I don;t need them to loop but te order is reveresd.
I see this in my chid themes functions php now, how can i get the order to be correct? thanks:
<?php
/*
* Add your own functions here. You can also copy some of the theme functions into this file.
* WordPress will use those functions instead of the original functions then.
*/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_previous_post($settings[‘same_category’], $settings[‘excluded_terms’], $settings[‘taxonomy’]);
$entries[‘next’] = get_next_post($settings[‘same_category’], $settings[‘excluded_terms’], $settings[‘taxonomy’]);
}return $entries;
}function remove_title_attr(){
?>
<script>
jQuery(window).load(function(){
jQuery(‘#wrap_all a’).removeAttr(‘title’);
jQuery(‘#wrap_all img’).removeAttr(‘title’);
});
</script>
<?php
}
add_action(‘wp_footer’, ‘remove_title_attr’);June 24, 2025 at 8:33 pm #1485852Sorry forgot to add credntials
June 25, 2025 at 6:48 am #1485874Hi,
Thank you for the inquiry.
Try to remove this part from the avia_post_nav_entries filter.
$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’]);
Let us know if this makes any difference.
Best regards,
IsmaelJune 25, 2025 at 11:45 pm #1485916No I dleeted thos elines in the chld theme functions php and it had no effect. Also we need the nav to stay witjin the same taxonomy. While it does that generally speaking when you get to the end of the projects it then shows all the staff ebtires which are also portfolio items in another catagory. Can we remedy that as well? It looks to me like the code was ser up to do that,but i Gather it didn’t.
Thanks so much
June 26, 2025 at 7:11 am #1485923Hi,
Thank you for the update.
Try to replace the whole filter with the following code:
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; // swap prev and next $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']); } return $entries; }
when you get to the end of the projects it then shows all the staff
Also, make sure that the portfolio items don’t share even a single category, otherwise, they will be included in the navigation.
Best regards,
IsmaelJune 26, 2025 at 7:30 pm #1485972Hi Ismael,
Puting in that code instead had no effect. I out ut back to the way it was for now. Ay other ideas? Also is there a way to keep the nav in the same taxonomy so the staff and rojects are seperate, so when you get to the end of the projects it doesn;t go to staff and vice-versa?
Thanks
-
AuthorPosts
- You must be logged in to reply to this topic.