Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #1366386

    Hi,

    I have ACF field groups showing up in our blog again.

    I’ve tried adding the code from this post https://kriesi.at/support/topic/acf-groups-showing-in-masonry-element/

    but that doesn’t work. How can I change this code to prevent this from happening?

    https://www.baysixty6.com/blog/

    Thanks

    Phil

    #1366490

    Hey philthebass,

    Thank you for the inquiry.

    We modified the filter a bit to make it work with the blog posts grid element. Please remove the previous code and add the following in the functions.php file.

    function avia_post_slide_query_mod($query, $params) {	
        foreach($query['post_type'] as $key => $value) {
            if( $value == 'acf-field-group' ) {
                unset($query['post_type'][$key]);
            }      
        }
    
        return $query;
    }
    add_filter('avia_post_slide_query', 'avia_post_slide_query_mod', 10, 2);
    

    Best regards,
    Ismael

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