Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1010700
    #1010883

    Hey Stefano,

    You can use this code to exclude certain entries from the portfolio grid

    
    add_filter( 'avia_post_grid_query', 'avia_post_grid_query_mod', 10, 2);
    function avia_post_grid_query_mod( $query, $params ) {
    	$query['post__not_in'] = array(1301);
    	return $query;
    }
    

    You can replace 1301 with any other id (1301 would exclude “Odontoiatria Generale”). You can also exclude more entries, just separate the ids with commas like 1301,1302,1302…

    Best regards,
    Peter

    #1011219

    No, I want that ID selected (ex 1305 https://www.centromedicodentale.com/servizi/implantologia-dentale/) is hidden in grid portfolio on botton right, this for each id item opened

    #1011234

    Hi!

    You can try this code to exclude the current page/post from the grid:

    
    
    add_filter( 'avia_post_grid_query', 'avia_post_grid_query_mod', 10, 2);
    function avia_post_grid_query_mod( $query, $params ) {
    	global $post;
    	$query['post__not_in'] = array($post->ID);
    	return $query;
    }
    

    Best regards,
    Peter

    #1011326

    Thanks, perfect !

    #1011330

    Hi!
    Glad I could help you :)

    Regards,
    Peter

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.