Tagged: portfolio navigation
February 10, 2020 at 7:49 pm #1183200
I noticed an issue with the previous/next navigation on the portfolio this morning. The posts are no longer locked into their respective categories.
When you click on Shades of time at FLL, on the right side of the screen you click to go to the next project and it says “Hoffman’s Chocolates,” but in the retail category it should be “The Port Retail.”
Just an FYI, I am running this filter to swap left/right arrows:
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_next_post($settings[‘same_category’], $settings[‘excluded_terms’], $settings[‘taxonomy’]);
$entries[‘next’] = get_previous_post($settings[‘same_category’], $settings[‘excluded_terms’], $settings[‘taxonomy’]);
}February 13, 2020 at 3:33 am #1184037
Thank you for the inquiry.
You should also use the avf_post_nav_settings filter to enable the same_category parameter or set it to true. Please check the thread below.
IsmaelFebruary 13, 2020 at 4:11 am #1184039
I tried adding that into the functions, cleared the cache, but it didn’t work. I even commented out other settings and I am still having an issue keeping it in the same category. Any other suggestions?February 14, 2020 at 8:05 am #1184423
Thank you for the update.
The same_category parameter is actually working but not how you expect it to. The item Hoffman’s Chocolates displays after the Shades of time at FLL item because they both belong in the same category called Airport/Aviation. You have to remove the item Shades of time at FLL from that category if you want the post navigation to fetch the next item in the Retail category, which is the The Port Retail item.
IsmaelFebruary 14, 2020 at 6:55 pm #1184593
So, if I am understanding correctly, using my current setup I cannot put the projects in multiple categories because I will have this issue, Beyond making lots of duplicate portfolio items, is there anything else I can do to accomplish this?February 17, 2020 at 5:31 am #1185080
Yes, that is correct. There is an available filter that you can use to adjust the query for the post navigation, but we might not be able to help you adjust it based on your requirements due to time constraints. You can find an example here:
Thank you for your patience.
IsmaelFebruary 17, 2020 at 11:59 pm #1185468
Thank you for pointing me in the right direction. I may try to adjust the query, or tell the client we’ll need to find a different approach,February 18, 2020 at 2:50 pm #1185676
You must be logged in to reply to this topic.