How can i add a metabox to pull list of custom posts (any two) on edit or add post screen?

You can add a metabox in the edit screen with add_action( ‘add_meta_boxes’, function () { add_meta_box( ‘yourcustom_sectionid’, __( ‘👋 Custom Meta Box’, ‘yourtextdomain’ ), function ( $post ) { wp_nonce_field( plugin_basename( __FILE__ ), ‘yourcustom_noncename’ ); $cstm = get_post_meta(get_the_ID(),’yourcustom_meta’,true); echo “<pre>”.print_r($cstm,true).”</pre>”; }, ‘page’ ); } ); You can query posts with get_posts() and add some check … Read more

Reslug a Custom Post Type

I also created a similar approach as was mentioned by @sri, however using $wpdb vs wp_update_post should be more performant and configurable. /** * Reset the slugs on a particular post type to use the default sanatized slugs * @param string $post_type filter by post type * @param int $offset set the paginated post to … Read more

Need help with complex custom post type setup

Ok, that is complicated 🙂 Have you considered using rewrite endpoints? I would not try and cram everything into the url unless you have a specific need or a requirement for that. domain/<series>/<episode-name> would be going directly to the episode CPT domain/cartoon-series/<series> – would go the the series CPT Then using rewrite endpoints to have … Read more