On each portfolio page I would like to show related entries. I found these threads about this for excluding to current portfolio item:
https://kriesi.at/support/topic/related-portfolio-items/
https://kriesi.at/support/topic/related-portfolio-entries/#post-138386
Is there a way to do this with a masonry rather than a portfolio grid? I guess I just need a modification of the code Dude posted in the thread above.
Cheers!
Hey aph80!
Try this out.
add_filter('avia_masonry_entries_query','avia_exclude_current_masonry_item',10, 2);
function avia_exclude_current_masonry_item($query, $params)
{
global $wp_query;
$postid = $wp_query->post->ID;
$query['post__not_in'] = array($postid);
return $query;
}
Cheers!
Elliott
Perfect. Thank you!