I got an answer on WordPress Support forms, http://wordpress.org/support/topic/widget-dropdown-always-displays-first-option?replies=6
Replaced function form with,
function form( $instance ) {
// Check values
$category = isset( $instance['category'] ) ? (int) $instance['category'] : '';
$terms = get_terms( 'app_category', 'parent=0&hide_empty=0' );
if ( !empty( $terms ) && !is_wp_error( $terms ) ) {
?>
And changed,
name="<?php echo $this->get_field_name( 'Category' ); ?>"
to
name="<?php echo $this->get_field_name( 'category' ); ?>"
Related Posts:
- Widget to display custom taxonomy tag cloud
- get / list categories and counts filtered by custom taxonomy term
- “show option all” on list categories doesn’t display taxonomy
- display taxonomy slug from term ID
- Using wp_list_categories to show more than one custom taxonomy
- Display Taxonomy Terms in an option tag with value being the slug
- Retrieve Custom Taxonomies according to posts selected
- Category list with indent children list below current category
- Custom taxonomy terms in the admin site is not saving for widget
- Widget Logic use with Custom Taxonomy
- How to show all post related taxonomies
- Select multiple categories from CPT to display in LayersWP builder widget
- What does ‘category__in’ mean in queries?
- Using wp_dropdown_categories in widget options
- Trying to add taxonomy to get_categories() but it’s not working. How to fix this?
- Proper WP conditional tag to check for existing taxonomies to list out terms with wp_list_categories?
- wp_dropdown_categories – how to save in widget?
- Remove taxonomy widget from “PAGE” post
- Limit Display Number Of Taxonomy Term
- Show single Child Category on Custom Post
- Get 1st parent category id from post
- How to show category list in WordPress
- How To Create Dynamic Permalink To Custom Taxonomy List of Current Posts?
- List all taxonomies with their descriptions
- Problem with wp_list_category with custom taxomy
- ACF Custom field not showing in Timber Taxonomy page
- Add and Custom category for posts “PAGE”
- Custom taxonomy list in Worpdress
- Displaying Custom Taxonomy List Posts By Slug?
- Alternative for is_taxonomy() to workaround theme’s default sidebar
- custom texonomy category child category list with parent head
- Hide empty categories on widget
- Removing “trashed” posts from post count in custom taxonomy terms?
- saving meta/custom field to tag
- Get only immediate children (and not grandchildren) of a hierarchical custom taxonomy term
- Proper use of wp_get_object_terms
- Remove a href from this code
- Why doesnt this query work? (Custom Taxonomy)
- Permalink Problems
- Get Terms for Page
- Adding a second custom taxonomy to a custom post type (both shown in its table)?
- Listing all slugs?
- custom post type, hide or disable the status line in publish meta box
- Take a custom taxonomy value and save as a standard Product Tag
- Set term on an attachment using wp_set_object_terms and want to display the full term text but it’s showing a slug instead
- Check If Taxonomy A and Taxonomy B has same Slug, 301 Auto Redirect Tax A to Tax B if True in WordPress
- How to show a custom taxonomy in the theme?
- Custom taxonomy archive page requires ?post_type= in url
- Multiple Custom Taxonomy Dropdowns Lists
- Restrict editing of posts with specific taxonomy to users with a matching meta value?
- Why isn’t the ‘no results’ being shown when a query returns no results?
- How to get_the_term_list() from multiple taxonomies?
- Load a certain functions file for a certain taxonomy
- link directly to custom post if there is only one in the taxonomy
- How to support fifteen thousand terms in WordPress?
- Get taxonomy name for the current post
- Add a term to list in block editor taxonomy sidebar
- Output all terms in a custom taxonomy and add a “active” class only to the ones attached to the current post
- category list with cutom post count
- Having a template per category? Bad for server overhead?
- How to get posts that contain multiple terms from multiple taxonomies?
- Cannot delete or edit a single term in a custom taxonomy, taxonomy name is wrong?
- View the complete list of a taxonomy in the navigation menu
- The Difference Between Categories and Tags and Taxonomies and Terms
- How to group all terms children’s in custom taxonomy?
- Reverse order of posts in a certain taxonomy archive?
- My custom taxonomy page is leading in 404 page
- How to get dropdown instance value in WordPress custom Widget
- Echo text using is_tag
- Display Posts by Custom Taxonomy Chosen Terms
- Include custom post type custom taxonomies in Categories widget
- Use get() method to grab all categories and output inside another method
- Correctly order the hierarchy of custom taxonomy when displaying terms
- Show template part if part of term
- tax_query: Don’t show posts with parent term when they have a corresponding child term applied
- Custom taxonomy terms not showing as list Gutenberg Editor WordPress
- {$taxonomy}_edit_form_fields not working
- custom page for custom Taxonomy
- Twin value tags as an esoteric taxonomy
- custom taxonomy not showing in Gutenberg
- Can I add other Custom Taxonomy to my syntax (functions.php)
- Custom Post Type Categories URL not displaying posts
- How to display a custom taxonomy without a link?
- Get post count for current custom taxonomy
- one post per term taxonomy
- Build filter for post-type + multi taxonomies + multi terms
- How to check if a post has at least 2 terms from a custom taxonomy attached?
- Duplicate slug/permalink issue
- How to remove the search field in custom taxonomy ui?
- How to add hierarchical taxonomy with parent child relation to URL?
- Getting taxonomies associated with a specified post type
- Display a colour of custom taxonomy on the page
- Display a specific hierarchical level of a specific custom taxonomy
- Display Custom Taxonomy names
- Changing input type from text to multi select dropdown – skill taxonomy
- How can I change the output display of my pagination?
- Hide custom Woocommerce taxonomies when empty
- Different Taxonomy Values for Each Post
- display a widget on specific category and its sub categories
- Multiple selection for wordpress widget