Tagged: portfolio items
Hi,
is there a way to display a list of portfolio items on single portfolio page excluding the item where we are currently in? How to exclude from that list current item?
Thanks.
Hi GIEKApl!
not sure what you mean, but I think it would require a heavy customization of the theme and you can find a freelancer for this job here.
Regards,
Andy
Hi,
some tips, please….
Hi!
You can follow the solution provided here: https://kriesi.at/support/topic/remove-current-portfolio-post-from-related-portfolio-grid-enfold/#post-462034
Cheers!
Ismael
Hi,
I tried all the codes but it did not help.
Hey!
What problems did you face when you tried the codes from the other thread?
Cheers!
Rikard
Hi,
There are no other problems, just display current item on list “Produkty powiązane”
Hi!
We modified the code there. Please use this instead:
function ava_exclude_portfolio($query) {
if (is_singular('portfolio')) {
$exclude = avia_get_the_ID();
$query->set( 'post__not_in', array($exclude) );
}
}
add_action('pre_get_posts', 'ava_exclude_portfolio');
Cheers!
Ismael
Great, it works
Thanks