Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • #28709

    Hi there,

    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

    add_filter('avia_post_grid_query','avia_exclude_current_portfolio_item',10, 2);

    function avia_exclude_current_portfolio_item($query, $params)
    global $wp_query;
    $postid = $wp_query->post->ID;

    $query['post__not_in'] = array($postid);

    return $query;


    Works like a charm.

    Thanks Dude :)

Viewing 3 posts - 1 through 3 (of 3 total)

The topic ‘Related Portfolio Entries’ is closed to new replies.