
-
AuthorPosts
-
May 24, 2019 at 6:14 pm #1103966
Hi Enfold Support Team,
I’d be grateful, if you could help me to resolve a problem regarding your “Masonry | Portfolio Entries” feature.
Please have a look at the following page on my DemoSite [Neubau > WA Übersicht (PF | Classic]. Within my settings you’ll see, that only the portfolio categories (WA Bludenz, WA Bregenz, WA Dornbirn, WA Feldkirch) should be displayed (note: if you do have a look at my “portfolio items”, you’ll note, that only 3 items meet this condition). As long as the user looks at the “portfolio overview” page, everything looks fine.
Now let’s assume, that a user does click on the first portfolio item thumbnail (Wohanlage “Am Bächle” | Bregenz). When you do hover over/click on the “Portfolio Nav Arrow” on the left hand side, you’ll note, that there’s shown a link to a portfolio entry called “Classic Single Entry”, which actually has been assigned the portfolio category “Design”. Why is this portfolio entry displayed (accessible to the user), although it doesn’t meet the above mentioned condition? Am I missing something?
Thanks in advance for your efforts.
Best regards,
RainerMay 30, 2019 at 3:26 am #1105316Hey rainert,
Thank you for using Enfold.
The post navigation is based on the get_adjacent_post function, so it returns the next or previous post in the order they were published. It doesn’t matter which category the posts belong to. If you want to filter out or exclude posts from different categories, use the “avf_post_nav_settings” filter and set the “same_category” parameter to true.
/* * $same_category: return posts from the same taxonomy term */ add_filter('avf_post_nav_settings','avf_post_nav_settings_mod', 10, 1); function avf_post_nav_settings_mod($settings){ $settings['same_category'] = true; return $settings; }
Best regards,
IsmaelMay 30, 2019 at 8:46 am #1105387This reply has been marked as private.May 31, 2019 at 5:18 am #1105588Hi,
The filter should be added in the child theme’s functions.php file. It enables the same_category parameter.
In case you don’t have a child theme yet, the documentation should help.
// https://kriesi.at/documentation/enfold/child-theme/
Best regards,
Ismael -
AuthorPosts
- You must be logged in to reply to this topic.