Multiple wp_editor instances in custom post type using Ajax

forget about using wp_editor on such scenario.. instead use the core tinymce, something like; tinymce.init({ //selector: ‘customEditor-‘ + nextPlusSignId, editor_selector: ‘nwac_editor_’ + nextPlusSignId, mode: “specific_textareas”, media_buttons: false, menubar: false, content_css: nw.baseurl + ‘/skins/wordpress/wp-content.css’, body_class: ‘mce-content-body nwac_plus_signs_’ + nextPlusSignId + ‘_template post-type-products post-status-publish mceContentBody webkit wp-editor wp-autoresize html4-captions has-focus’, });

Custom Post Type Archive Not Showing Posts

I generally include this chunk of code with my custom post types: // Load the custom post type archive page template add_filter( ‘archive_template’, ‘posttype_archive_template’ ) ; function posttype_archive_template( $archive_template ) { global $post; if ( is_post_type_archive ( ‘posttype’ ) ) { if(file_exists(PLUGIN_PATH. ‘/archive-posttype.php’)) $archive_template = PLUGIN_PATH. ‘/archive-posttype.php’; } return $archive_template; }

Query Posts, order by meta value

Your query seems fine but there are couple of issues. Instead of your code (from wp_reset_query(); to wp_reset_query();) use following code and let us know what is the output. $new_args = array( ‘post_type’ => ‘datensatz’, ‘post_status’ => ‘draft’, ‘posts_per_page’ => -1, ‘meta_key’ => ‘completeness’, ‘orderby’ => ‘meta_value_num’, ‘order’ => ‘DESC’, ); $my_new_query = new WP_Query( … Read more

Update custom post type title

Try this out, add_filter( ‘wp_insert_post_data’ , ‘modify_post_title’ , ’50’, 2 ); function modify_post_title( $data , $postarr ) { if($data[‘post_type’] == ‘{custom post type}’) { if($data[‘post_title’] == $postarr[‘post_title’]){ update_post_meta( $data[“ID”], ‘custom_field’, ” ); } } return $data; } Reference: https://wordpress.org/support/topic/modifying-title-before-saving-custom-post