Saving multiple fields (dropdown and text) in custom metabox
It looks like the variable you’re using to set the selected item is not defined in that scope. In your constructor: public function __construct() { if ( is_admin() ) { add_action( ‘load-post.php’, array( $this, ‘init_metabox’ ) ); add_action( ‘load-post-new.php’, array( $this, ‘init_metabox’ ) ); } $this->dropdown_args = [ ‘show_option_none’ => ‘- select a page -‘, … Read more