Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #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?

    https://dl.dropboxusercontent.com/u/55661338/Screen%20Shot%202013-08-30%20at%206.27.32%20PM.png

    Please advise. Thank you.

    #138386

    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;
    }

    #138387

    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.