Is it possible to disable a theme programmatically?

here is no specialized hook for this. However the hook switch_theme should work for you. /** * Switches current theme to new template and stylesheet names. * * @since unknown * @uses do_action() Calls ‘switch_theme’ action on updated theme display name. * * @param string $template Template name * @param string $stylesheet Stylesheet name. */ … Read more

Filter Custom Post Type Posts by Taxonomy

You would specify listas as the post_type in the Query arguments. And specify taxolistas along with any terms of the taxolistas taxonomy in a tax_query. $args = array( ‘post_type’ => ‘listas’, ‘tax_query’ => array( array( ‘taxonomy’ => ‘taxolistas’, ‘field’ => ‘slug’, ‘terms’ => array ( ‘taxolistas-term1’, ‘taxolistas-term2’ ) ) ) );

Admin menu hilighting wrong item for CPT

Check: add_submenu_page( ‘edit.php?post_type=landingpage’, ‘Form Settings’, ‘Form Settings’, ‘manage_options’, // This is the menu slug, you can not pass the arguments, // if you want to pass arguments then add only one sub menu page and // links with arguments, also display content with conditions of passed arguments. ‘wp_cpt_plugin_page-form-settings’, ‘my_callback’ );