I had the same Error. It occured because I requested a post-type that didn’t existed.
add_filter( 'pre_get_posts', 'my_get_posts' );
//events don't exists
function my_get_posts( $query ) {
$query->set( 'post_type', array( 'post', 'page', 'events' ) );
return $query;
}
Related Posts:
- How to throw error to user when saving post
- wordpress plugin error handling
- How can I fix those issues generated by the Themecheck plugin
- Undefined property: stdClass::$labels in general-template.php post_type_archive_title()
- The editor has encountered an unexpected error. // TypeError: Cannot read property ‘prefix’ of null
- Full-Ajax Theme: parseJSON error while building a JSON object from a WordPress custom template
- wp is not defined error using wp.media to create a custom image uploader
- Check Title Unique Or Not and If not error message and dont save
- Notice: Undefined index: error and understanding wordpress
- Trouble with CPT Child 404
- Custom Meta Box Causing Error: “Are you sure you want to do this? Please try again.”
- Query not work for current taxonomy
- Custom Post Type and Breadcrumbs Conflict
- Custom Post Type Causes Error: Warning: call_user_func_array()
- I have a random letter appearing before my content. Where to start looking for the cause?
- “A post type mismatch has been detected” Error when updating custom post
- Error [Column ‘post_title’ cannot be null] when title is disabled for Custom post type
- Notices when submitting custom post type from front-end
- Custom Post Type slug has the same Redirection entry
- get_posts() return NULL using a custom plugin and add_submenu_page() with Post Type
- fehler beim laden des blocks: ungültige(r) parameter: attributes – Gutenberg
- Adding a new custom post type using the editor causes 502 bad gateway error
- detect when a custom post is cretaed for the first time
- Custom post type, have only my meta boxes
- Custom Taxonomy not displaying all post
- Exclude current post for custom post type
- detect your custom post type in WordPress
- Add categories to a page with out using Custom Post Types
- How to limit post per page of custom post type?
- How to get all Custom Post Type Filtered by one Specific Taxonomy Term
- How to customize work area / admin area in a custom post type without plugins?
- Custom posts template page
- Display posts with tag for custom post type only
- Display Repeatable Meta Box Content
- How can i automatically add CPT single pages as sub menu items
- If there is only one post (show elements) else (show other elements)
- Conditional for post type inside loop (recent posts)
- Using wp_query to modify the loop in index.php for a CPT
- A Collection of Custom Post Types Displayed In a Submenu
- Category archive in with conjunction with custom post type is empty
- writing posts in indian regional language (Punjabi)
- Set thumbnail and title for a post type archive (not post itself!)
- the_post() is printing titles in page footer
- Use remove_meta_box conditionally on custom post type
- create custom meta box with default value
- Different slug taxonomy for two different CPT
- Can I restrict category availability?
- New “Custom Types” item in admin menu. Is this a plugin or a new wordpress feature?
- Custom columns doesn’t appear in custom post type
- Create an archive page for custom post type with custom taxonomy
- ACF in wordpress
- WP_Query Custom Post Type if Category ID Equals
- Programatically inserted posts not showing in Posts Table
- Theme independent plugin by using default page template
- Can’t use pagination with custom taxonomy
- Why does accessing url by category cause issues with post types?
- Custom Post Type Category On Admin
- Option page’s form doesn’t work
- Hide specific taxonomies from a taxonomy list using ‘get_object_taxonomies’
- How does the ‘the_post_navigation()’ work for CPT’s?
- Add arguments to get_the_terms for custom post types
- Custom User role not working with custom post type
- Display post from a date range from custom field
- Is it safe to change a Custom Post Type from “hierarchical:false” to “hierarchical:true”?
- How to set up Custom Post Type archive page as Front page
- Display custom post using ID
- Url to archive page for custom post type
- Loop through custom posts by taxonomy and display the titles in a list, it is repeating 8 times
- retrieve permalinks of posts inside custom post type by using post ID
- admin-ajax.php GET custom-post titles
- Custom Permalinks with meta value not working. Why?
- Create metaboxes based on custom post type
- How can I use this code on a custom database table?
- Custom URLs in post types make it impossible to view archive
- Editor / Add Media: Is it possible to only allow galleries?
- Custom post types and ‘new WP_Query’
- Can I change my post type to anything and my site still work?
- custom post type and custom taxonomy
- Custom post type as child of page
- Query Custom Post Types with checkboxes
- How to add and clear custom post types and taxonomies in a plugin? Considerations for existing data
- Creating custom post type with custom taxonomy and custom fields programatically
- Automatically create child custom post when creating a custom post
- Conditional Tags for specific category of custom posts
- How can I have different content for different countries?
- Showing only one category on portfolio page BUT filtering remaining categories with Isotope
- ACF repeater field usage
- How to get only child terms from a custom taxonomy of current post type?
- Custom WP_Query doesn’t display all posts
- Add custom CSS class to custom post type
- How can I use archive-{post_type}.php theme template?
- Remove custom permalink structure from custom post type without modifying register_post_type() directly
- How to add current custom taxonomy slug to body class
- Dynamic bootstrap tabs with post_title doesn’t display the_content
- Running a song lyrics site on WordPress
- Change Slug of a Custom Post Type
- Custom post type – list posts based on meta_key and display them divided by CPT taxonomy category
- Get $post->ID from a URL
- Redirect to archive is single post has a certain term assigned to it?
- Using page slug in wp_query