In the single portfolio page, I wanted to create a related portfolio entries to show up at the bottom of the page.
Using the template builder and with the portfolio grid added, I’m able to do that to show a specify category.
Since the portfolio grid is showing the entire category, it repeat what its showing on that single portfolio page too. How can I exclude it?
Please advise. Thank you.
I didn’t test this code but please try it – add it at the very bottom of functions.php
function avia_exclude_current_portfolio_item($query, $params)
$postid = $wp_query->post->ID;
$query['post__not_in'] = array($postid);
The topic ‘Related Portfolio Entries’ is closed to new replies.