• Resolved Jordi

    (@kukat)


    hi! I found a function on a past topic for exclude posts in a “Post Grid” loop. Don’t work when I try to exclude pages.

    function filter_post_query( $query_args, $attributes) {
        // Unique class name added from Advanced tab for Post Grid.
        if ( 'my-post-grid-class' == $attributes['aventurasGrid'] ) {
            // 123 and 456 is the post id you want to exclude.
            $query_args['post__not_in'] = array( 313,297,41,315,32,311,299,3,317 );
        }
        return $query_args;
    }
    add_filter( 'uagb_post_query_args_grid', 'filter_post_query', 10, 2 );

    This code still working?

    Thanks a lot.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hi @kukat ,

    Thanks for writing to us.

    I am afraid this is not working at the moment with the provided options in the spectra. We’d love to take this as a suggestion. I will surely convey your feedback to our concerned developers. We are always keen to listen to our customers and to receive their feedback. This is the best way to improve our products and services and maintain our client’s satisfaction. ??

    I’ll put forward your thought about this to our team and if feasible we will try to improve the scenario in our future updates.

    If you have any further queries, please don’t hesitate to contact us.

    Have a nice day!

    Thread Starter Jordi

    (@kukat)

    OMG! And all the websites that used this code? I hope you have noticed, otherwise I might be creating quite a bit of confusion.

    Hi @kukat,

    So sorry for the confusion.

    For clarity, I meant that this was a workaround used in UAG two years ago however with Spectra we don’t have the feature to exclude pages from post grid, however we’ll take this as a suggestion to help us improve on this feature in the coming updates.

    Hope this clarifies.

    Please let us know whether you have any other queries.

    Hello @kukat,

    It’s been long since we heard from you. I am going to mark this as resolved.

    Please feel free to open a new thread in case of any other queries.

    Regards.

    Judith.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Exclude pages from post grid?’ is closed to new replies.