Cannot save or preview custom post type in admin
-
Hello,
I was using CPT-onomies for one thing, a custom post type, and it worked perfectly for months. I just built a redesign and launched it last week. When I did this, I created a new category that I put all of these custom post type posts into. I also added the post type to the main query like so:
function add_ask_us_to_query( $query ) { if ( (is_home() || is_front_page() || is_category() || is_archive()) && !is_admin() && $query->is_main_query() ) $query->set( 'post_type', array( 'post', 'ask_us_anything' ) ); return $query; } add_action( 'pre_get_posts', 'add_ask_us_to_query' );
I also added a rewrite rule in the CPT-onomies post settings screen, and was sure it was different from the category I made with a similar name. I downloaded Rewrite Rules Inspector and it shows no errors.
I made a custom single-(mycustompost).php and that all seems to be working just fine.
However, when I did these things, I went into the custom post type admin area, and I get the listing of posts that are my custom post type, and I select one, and get the editing screen – if I try to save a modification or I try to even preview the changes, it spins and spins trying to retrieve the page then finally gives me a 502 Bad Gateway error.
I’ve spent hours troubleshooting and have only contacted you as a last resort. Any ideas? Thank you for taking the time to check out my problem, in advance.
http://www.ablogtowatch.com – it’s the Ask item in the main nav that brings up the category with the custom post type, ask_us_anything listing. No problems on the front-end.
- The topic ‘Cannot save or preview custom post type in admin’ is closed to new replies.