elemenope on "[Plugin: Custom Post Type UI] How to remove custom post types?"

ساخت وبلاگ

Alright, I'm not able to save the file myself, but I believe I have pinpointed the issue.

I was able to successfully see the listing myself on my own dev site, using your settings.

However, I noticed some usage of the pre_get_posts hook in your child theme's functions.php file, and that would actually have an effect on the admin.

I recommend amending that to the following:

function add_custom_types_to_tax( $query ) { if ( is_admin() ) { return; } if( is_tag() && empty( $query->query_vars['suppress_filters'] ) ) { // Get all your post types $post_types = array( 'post', 'portfolio' ); $query->set( 'post_type', $post_types ); return $query; }
}
add_filter( 'pre_get_posts', 'add_custom_types_to_tax' );

Notice that I added this to the top, which prevents it from running in your WP admin area.

if ( is_admin() ) { return;
}

Try it out and let me know if that fixes all the remaining issues.

WordPress ...
ما را در سایت WordPress دنبال می کنید

برچسب : نویسنده : استخدام کار wpss بازدید : 376 تاريخ : جمعه 5 شهريور 1395 ساعت: 15:39