Hi there,
Not quite sure what happened here and why, since our UI shouldn’t be doing THAT much with regards to changing details unless you were trying rename the slug and whatnot. Even just clicking things with regards to switching which post type’s settings you’re using would only do that much, change out the post type. Not try to rename or anything, and certainly not without clicking save.
Anyways, all of the post/post meta data should still be in the database, as we intently don’t delete anything for users. The post type they’re assigned just isn’t getting registered at the moment and thus the UI isn’t being generated.
If you have a local/dev copy with the same content/content types, you should be able to visit the Tools menu and then the “Post Types” tab and get the settings in a JSON format, found on the right hand side, that can be imported back into the troublesome site, via the same page, but using hte left hand side.
function themeprefix_show_cpt_archives( $query ) {
if( is_category() || is_tag() && empty( $query->query_vars[‘suppress_filters’] ) ) {
$query->set( ‘post_type’, array(
‘post’, ‘nav_menu_item’, ‘ugyintezok’,’allasajalnalat’,’zart’,’jegyzokonyvek’
));
return $query;
}
}
add_filter( ‘pre_get_posts’, ‘themeprefix_show_cpt_archives’ );
//////////
If this code snippet is included in funtcions.php then the post editor, category pruning does not work! This is the error: wrong post type.
Pls help me!
@karpathir
Can you please start your own thread over at https://ww.wp.xz.cn/support/plugin/custom-post-type-ui/ instead of piggy backing off of the original issue and thread here? Thanks.