If $query->query_vars['suppress_filters']
is not set you will get that message.
Use empty($query->query_vars['suppress_filters'])
instead of false == $query->query_vars['suppress_filters'] )
or use $query->get('suppress_filters')
like this false == $query->get('suppress_filters')
.
Untested (minimally tested) but I believe either of those should give you the same results minus the notice.
Related Posts:
- Set posts of a custom post type to be private by default?
- How can I add dropdown widget/box to admin post page?
- Limit Authors to their Own Posts on front-end excluding admins
- Multiple Content Block
- Shortcode not working with post counter
- Changing default ‘posts’ parameters with register_post_type_args
- Homepage’s content is dependent on the custom field values (set automatically), how do I get homepage to update without manually updating page?
- Allow users to create posts without logging in?
- How to assign classes to all elements?
- Showing custom post type categories in the menu
- WordPress notification if new post published
- Get post format
- Template code to split a post and print a custom field?
- Send post changes to set email addresses (not users or subscribers)
- Function to limit number of custom post types on homepage – TwentyTen
- Display author box on just certain category posts?
- redirect after submiting post for review
- What is the best way to set the post category (Custom Post Type) automatically based on the one of the tags assigned to the post?
- subtracting the current post form then whole loop, which is generating all CPT titles
- When post is Published, insert into custom table a number – custom post type
- Post that populates itself (almost) automatically using data from imported excel file
- How to mark posts as visited
- Work and Display a Custom Post Type as a normal Post
- Featured image in custom post is being disabled
- How to make post page unique and show it on home page?
- How to filter homepage posts by popularity? [closed]
- How to make a non-public post on wordpress approval?
- Frontpage overriding my posts
- Find the user who initially created the post
- Copy custom field value to post title
- Need help targeting a custom post type with conditional tags
- How to get the post type from a category id?
- Insert HTML inside link in a walker
- right_now_content_table_end function not working?
- WooCommerce product search titles only
- How to Separate CPT From Regular Posts?
- Remove rows in the manage post/page view
- Custom Taxonomy Permalinks Redirection
- Add custom column in custom post type edit page
- Is there a way to have the view link on manage posts page to open in a new window or tab?
- How to create custom boxes with text inside?
- How to add post_type=value when editing that post type in the WordPress admin?
- wp_insert_post generates endless posts
- Adding dropdown select meta box to custom post type – seems restAPI is interfering
- Remove standard meta boxes from custom taxonomy
- Open Custom Post Type as PDF
- Using The REST API How To Pull All Custom Posts?
- How i can add ‘N’ page of ‘N’ pages under posts loop?
- What’s the difference between same wp functions get_posts(); functions in different form?
- I did group my search results by post type, but how can i give each of them its own order?
- Dequeue scripts and styles only for specific custom post type
- Function to display custom post type on front page makes menu items dissapear
- custom post type not showing in menu
- Show the same Article Available in Other Categories
- Getting posts under the custom post type ui category
- Show category ID on custom post type
- Storing posts from query and accessing later via AJAX call
- If post has custom field then display css-class
- How to customize a permalink (URL) structure?
- Display only one post each WEEK
- Custom Post Type with Templates using Meta Boxes?
- List children on child post
- Custom post type is showing custom home page, not archive page
- Can I list a custom post type within another custom post type in the admin area?
- Restrict custom post type from appearing with ?post_types=
- Change custom post type slug from plugin options
- Show custom post type filtered by category
- create parent post using wp_insert_post
- Turn on and off custom post type from admin?
- Missing Posts in Custom Taxonomy List
- Display random posts, but omit the post it is on?
- How do I do this with WordPress? Taxonomies?
- Disable block with taxonomies at post page
- I would like to have different styles for my posts based on the content of each post
- How can i add thumbnails images to particular post (using code not admin pannel) in wordpress
- Showing posts from different categories and from custom post type
- Get latest 3 posts from multiple CPT in one query
- Can’t edit custom post type
- Allow non-logged in users to see a future post after clicking on a list of future posts
- Which post does a taxonomy term belongs to?
- List custom taxonomy specific to one custom post type
- Post image in WordPress not appearing on home page
- How to add a custom-post-type post within another custom-post-type post edit screen using AJAX?
- Meta query for custom post type ignored in main query
- Changing custom type name hides the posts
- Set URL link to featured image of custom post type
- Display Ad on Specific Categories
- Change CPT archive title
- AJAX load more for different custom post type loops
- Hiding posts by other users and non-logged in
- PHP variable not regenerating when publishing multiple posts at the same time
- On update or create post redirect to current post position in list
- I need to add endpoint for wordpress categories
- custom home page and custom index page?
- Update Post Meta for a logged in user
- Add custom field to Posts and sort by it
- Add custom post type settings to wordress default posts
- How to target a specific custom post type post and its all children and grandchildren?
- Featured image overlay when changing post status
- Get related posts of child term of custom post type