Title: Empty multiselect fields when using Shortcode in Posts
Last modified: April 18, 2021

---

# Empty multiselect fields when using Shortcode in Posts

 *  [matzeatweb](https://wordpress.org/support/users/matzeatweb/)
 * (@matzeatweb)
 * [5 years ago](https://wordpress.org/support/topic/empty-multiselect-fields-when-using-shortcode-in-posts/)
 * Hey there,
 * I think there’s a mistake in the “of-taxonomy-walker.php” file in line 196 which
   prevents the plugin to properly display multiselect fields when using the shortcode
   in WordPress Posts:
 * Change this
    `$link = "<option class=\"level-".$this->multidepth."\" value='".
   $cat_id."'$checked />".$pad.$cat_name;`
 * To this:
    `$link = "<option class=\"level-".$this->multidepth."\" value='".$cat_id."'
   $checked >".$pad.$cat_name;` to make it work (i.e. delete the “/” before the 
   closing “>” in the <option …> tag.
 * My guess why this happens is: The WordPress engine probably auto-corrects the
   HTML in posts. Since “<option … />” in the outputted code “<option … />Item</
   option>”looks like a self-closing HTML code, it will be converted to “<option…
   ></option>Item</option>” in the first step and then to “<option …></option>Item”,
   i.e. the second (supposedly useless) closing </option> will be deleted, which
   will hide the “Item” text in the rendered website. This does not happen when 
   using the short code in an individual html widget in a sidebar, since WordPress
   probably don’t touches this kind of HTML and the browser seems to tolerate this
   mistake.
 * Best regards,
    Matthias

Viewing 1 replies (of 1 total)

 *  Plugin Author [Code Amp](https://wordpress.org/support/users/codeamp/)
 * (@codeamp)
 * [5 years ago](https://wordpress.org/support/topic/empty-multiselect-fields-when-using-shortcode-in-posts/#post-14366138)
 * Hey [@matzeatweb](https://wordpress.org/support/users/matzeatweb/) , thanks for
   flagging this, it will be included in an update towards the end of the week.
 * Best

Viewing 1 replies (of 1 total)

The topic ‘Empty multiselect fields when using Shortcode in Posts’ is closed to 
new replies.

 * ![](https://ps.w.org/search-filter/assets/icon-256x256.png?rev=3096093)
 * [Search & Filter](https://wordpress.org/plugins/search-filter/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/search-filter/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/search-filter/)
 * [Active Topics](https://wordpress.org/support/plugin/search-filter/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/search-filter/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/search-filter/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Code Amp](https://wordpress.org/support/users/codeamp/)
 * Last activity: [5 years ago](https://wordpress.org/support/topic/empty-multiselect-fields-when-using-shortcode-in-posts/#post-14366138)
 * Status: not resolved