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
- Adding a new custom post type using the editor causes 502 bad gateway error
- How do test if a post is a custom post type?
- Remove the “View” Link in Post Admin
- How to assign specific users the capability to edit specific pages / posts / custom post types
- Loading custom page template via plugin
- Custom post type Vs. data in own table
- Customize Search to only search current custom post type
- Jetpack infinite scroll render – make different depending on post type?
- Custom Post type taxonomy single templates
- List custom post type but redirects to home page
- How to search CPT’s by meta query from the admin dashboard?
- How to get category image custom post type taxonomy in wordpress?
- Integrating Orbit slider into wordpress through custom post type
- how to get archive urls with same origin for custom types and terms?
- Custom Query to display posts with custom field
- Get taxonomy description based on variable
- SHOPP Custom Post Type, conditional tags
- Is possible to add post-formats to custom-post-type?
- Editable Meta Data for Custom Post Type Archive Template
- Filter by custom taxonomy slug on a custom post type
- Create 3 Level Relations with ACF and WordPress
- Why does wordpress keep adding postname to my CPT’s permalink in the end?
- Archive page for taxonomy terms
- Custom Post Type Set Comments ON by default without show METABOX
- How to get post type and month/year before while loop for date.php file
- Several post types on WP Query by tag and taxonomy
- School & class blogs: Categorize with categories or custom posts?
- Custom Postype specific changes in admin panel
- Custom Post Types vs. Advanced Custom Fields (with Repeater Field add-on)
- Query based on custom fields start and end date
- Create a permalink structure with custom taxonomies and custom post types gives 404
- Different Limit number of post on different archive page
- DIsplaying URL of custom field in last post of certain taxonomy && post type
- How to change “post_class()” for a custom post type?
- Custom post type menu-icon not showing up
- Using page slug in wp_query
- Assign post type to many users
- Meta box values not displaying in Post Edit Screen after save
- Get id from metabox dropdown
- Separate Content from gallery (custom post type)
- Problems with custom post type
- Custom Ratings for Theme, Proper way to Refactor Code and Clean up Template File
- Display list of custom post type which match taxonomy
- Sort results without WP_QUERY?
- What happens to my older posts if I switch to a child theme?
- Update custom field value
- Query Custom Post by taxonomy multiple categories
- How can I add custom fields in a custom post type? [duplicate]
- Create a Custom Path to Archive
- show most viewed posts of last days by link?
- Advanced archive url structure (category, tag and date)
- custom post type tag lists and link to post
- Get List of Terms based on a given term (different taxonomy)
- Add rewrite rule for custom post type single page
- Get Posts List of Current Selected Custom Taxonomy in Shortcode
- Custom taxonomy terms as children of multiple custom post types
- After inserting new post with wp_insert_post() the post is not visble to WP_Query, but the same WP_Query works for post inserted from wp-admin panel
- Define a page to show custom post type
- check if current page is a child of a specified top level page
- Display Custom Fields Meta Box on Category, Tags and CPT
- How can I use javascript in specific posts without relying on a plugin?
- Custom Post Types – trying to make “title” display
- pricefilter without WooCommerce
- Send email to author of the post when the custom post status changes to published
- filter post by date selected in a dropdown in realtime
- Possition a Custom Post Type Tab under Settings
- Custom post type that lets users create a set of posts?
- Pretty permalink structure with multiple (AND OR) taxonomies
- Iterating over custom post type archive returns incorrect first ID
- Execute code only after user clicks ‘update’ button for CPT being edited
- WordPress Custom taxonomy template
- Diffrent search templates for different post types
- Repeatable custom meta select boxes
- Getting (Invalid) when adding custom taxonomy of custom post type link in menu [closed]
- Display custom taxonomy posts of custom post types
- Custom Post type field don’t show in single machine
- Display div based on Group metabox selection [closed]
- ACF Field to set Publish Date – Post Duplication upon Update
- Is it possible to make is_category() recursive?
- Get X posts with the same terms as the current post (custom post type and custom taxonomy)
- displaying ACF Repeater Fields in Backend sorted by a subfield