Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • #28583

    Hi Team Kriesi,

    I already checked on your website to find an answer to my question – but didn’t find something. Therefore I will try my luck by asking directly. Is it possible to insert portfolios into my portfolio grid by an AND operation. Because at the moment it’s like I’m setting up an portfolio grid and choose which categories should be displayed. If I select category A and B all portfolios getting integreated that are in A or B. My target will be just implementing a portfolio into the grid if the portfolio has the category A and B (both first level categories not sub cats).

    Do you know a solution?

    Best regards,



    You can modify the post query but note that it will affect ALL portfolio grids. Open up wp-contentthemesenfoldconfig-templatebuilderavia-shortcodesportfolio.php and search for

    $query = array(	'orderby' 	=> 'post_date',
    'order' => 'DESC',
    'paged' => $page,
    'posts_per_page' => $params['items'],
    'post_type' => $params['post_type'],
    'tax_query' => array( array( 'taxonomy' => $params['taxonomy'],
    'field' => 'id',
    'terms' => $terms,
    'operator' => 'IN')));

    Replace the operator value and use AND instead of IN


    Hi Dude,

    many thanks for your help. I think the direction is good but it don’t work as I thought. You may know a solution. I have the following use case. The category catering, baden-württemberg, bayern, berlin belongs to several portfolio sites. E.g. first portfolio has the cat: catering, baden-württemberg, the second catering and bayern. Now I would like to show all catering cats that have also baden-württemberg or bayern. But what I don’t like that the music category will shown also due to a combination like music and baden-württemberg exists also.

    The cats look like this:






    And the portfolio should show just the portfolios where Baden-Württemgerg or Bayern is marked and caterging.

    Is there a chance? I know I could build subcategories – but with that I will have for each category 15 subcats at the end which is not that good. Therfore I would like to bring them on one level….

    Sorry for the lot of questions.

    Best regards,



    No, this is not easily possible because you can just set one relation and you try to combine two relations (namely AND and IN). It’s definitely possible to implement such a query logic but you need to hire someone to customize the files.

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

The topic ‘Portfolio category AND operation’ is closed to new replies.