It was a long way around to get there but you basically have a markup error. You didn’t name your select. You should have:
<select id="select-taxonomy" name="<?php echo $name ?>"> // <-- here is the change
<?php foreach($terms as $term) {
$id = $taxonomy.'-'.$term->term_id;
$value= (is_taxonomy_hierarchical($taxonomy) ? "value="{$term->term_id}"" : "value="{$term->term_slug}"");
echo "<option id='in-$id' ". selected($current,$term->term_id,false) ." {$value} />$term->name</option>";
} ?>
</select>
You don’t name the individual options. You name the select
itself. With that change, it works just fine.
Related Posts:
- How can I create a taxonomy meta-box with search suggestions but no new terms input?
- How to group meta boxes on the post edit page
- Is there a filter/action to add content to WP admin metaboxes?
- Consolidate Metaboxes into 1 Big Metabox
- How to remove/hide the predictive autocomplete popup when I type in the tag/term metabox
- Taxonomy as checkboxes
- metabox with custom post type values
- Display Term Metabox Only On Certain Term Edit and Add Pages In Admin
- multi custom fields and taxonomy search
- How to show taxonomy terms from wordpress database?
- How to make a metabox that contains link categories?
- issue with saving custom metaboxes fields
- Multiple category filters
- Custom Taxonomy as checkbox or dropdown
- How to HIDE everything in PUBLISH metabox except Move to Trash & PUBLISH button
- Removing panels (meta boxes) in the Block Editor
- How to Add Reminders/Notes to New Post Meta Boxes
- How to reorder meta box position?
- Custom Meta Boxes: multiple fields within a repeatable field
- get a specific taxonomy term name
- Modify Term Update Redirection
- get registered metaboxes by post type or post ID
- Remove metabox from specific page template in admin
- Attach Files Metabox
- get_terms() How many is TOO many?
- How do I create a meta box for dates?
- Check if current term is a child of another term
- Add a meta description to home page?
- Is there any difference between post in child term and child & parent terms?
- Create and move terms for taxonomies
- Set height of the categories meta box in post dashboard
- Looping Through Custom Tax Terms and Displaying All Posts For Each
- How to get the top most term (top ancestor) of a custom taxonomy child term?
- Get image captions for images on gallery post format metabox
- How can I remove links from the function “get term list”?
- Get Term names from WP Term Object
- List all custom post type posts from a given category?
- Demo Import changes terms ids
- I need a Simple image uploader with a simple screen. WP default has too many options.
- functions to create term and child terms
- How do i hide the auto-generated custom field that’s created when update_post_meta() is called?
- How to search by metadata using REST API
- How do I get the current tag out of a taxonomy?
- Automatically add a tag according to custom metadata
- How to add categories to page editor?
- Change term name only on front
- Display meta box on front end
- Taxonomy search/filter with multiple taxonomies and multiple taxonomy terms
- Get Current Custom Taxonomy ID by Post ID
- Display a list of certain categories by ID
- How to use MarkDown in a custom textarea field?
- Remove ShareDaddy meta box from Pages only
- On click hide group of metabox, similar to screen options checkbox?
- How to make a stand-alone button to the post edit view
- wp_editor loses data, perhaps an html_entity_decode problem?
- How to list all tags as radio buttons in a meta box?
- Create custom taxonomy and Display in metabox dropdown
- Display Content if Meta Checkbox is checked?
- Why does wp_get_object_terms add a period after terms are output?
- add_post_meta() & update_post_meta()
- MetaBox with Editor instead of textarea – html not saved [closed]
- Why do Metabox use Nonces?
- Return Taxonomy Name for Each Term
- Display sibling categories on category page
- Hide Page Title with Post Meta
- Show button if meta box has content, else hide
- Post Excerpt field only showing for default administrator
- If has_term, load other theme
- Custom Post Type Taxonomy Term Order by Title
- Checkbox in post not saving value
- How to get the term description in a taxonomy term archive query?
- Custom loop attached to link
- Bug using wp_insert_term with switch_to_blog
- post meta – problem : copy the same meta for all the articles
- Can’t get term id for category archive
- Get List of Terms based on a given term (different taxonomy)
- Remove Username and just show Name in Author Metabox in backend
- how can I make this metabox area
- Cloning product not copying custom taxonomies
- Metabox not saving values
- Update Post Meta in Front End with a form
- Metabox with checkbox is not working true!
- Displaying a Metabox linked to post settings for all users
- set a custom post type to a taxonomy term programmatically in metabox
- Can’t get meta values to save
- Get custom term link archive with prefix
- Error when adding Meta Boxes, but only when adding 3 with the same callback
- taxonomy terms are not populating select tag options
- add_action priority and taxonomy used in plugin
- A correct hook for saving meta boxes data
- Display taxonomy term slugs
- update_post_meta does not work
- Hooking into the Meta Boxes (Name/Web Address/Description) on the ‘Add New Link’ Page
- when saveing $meta_box i get Undefined index error
- Adding a Custom ‘Now’ button under ‘Published on’ header to return current date and time
- Adding meta boxes to custom post type
- ISOTOPE – Missing/Invalid Arguement Get Terms
- Need help, Passing variables with get_post_meta
- Taxonomy term RestApi data 10 rows limitions
- My meta box don’t want to save value