Hi there
I have a portfolio grid at the bottom of each portfolio entry. I want to use it to display other entries from the same category as current entry. Of course, I can just choose the category in the shortcode parameters, but the fact is I have litterally hundreds of entries. I use a Post Snippet to keep only one version of my layout and managed to personalize each entry with customized Enfold shortcodes and Custom Fields.
Now that I need to add related entries, I struggle to force the custom av_xxx_portfolio shortcode to automatically display entries from the same category(ies) than current entry.
I am pretty sure it is not THAT hard to do, using get_the_category() function or something.
Any hint or solution will be much appreciated.
Best regards,
Julien
Hey Crimson-Guard!
It’s bordering on custom work so it would be best to hire a freelancer to help you out. If you want to try and work through it on your own then I think the area your looking for is around line 270 in the /enfold/config-templatebuilder/avia-shortcodes/portfolio.php file.
But of course if you edit the shortcode file then it will effect everywhere you use the shortcode so you would need to add another parameter to differentiate between them.
It would probably be best to just add the portfolio shortcode in the page content manually.
Cheers!
Elliott
Thank you Elliott
I didn’t managed to use get_the_category(). No idea why.
Thank you anyway, I’ll figure another, less automatic, way.