Title: boolean shortcode options not interpreted correctly
Last modified: August 30, 2016

---

# boolean shortcode options not interpreted correctly

 *  [dynamitepets](https://wordpress.org/support/users/dynamitepets/)
 * (@dynamitepets)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/boolean-shortcode-options-not-interpreted-correctly/)
 * according to the examples at [http://wpstorelocator.co/document/shortcodes/](http://wpstorelocator.co/document/shortcodes/),
   specifying a value of `"false"` for e.g. the `country` option on the `[wpsl_address]`
   shortcode should prevent the country field from being displayed, however this
   doesn’t work.
 * i’ve tried using double, single and no quotes, but none have any effect. specifying
   a value of `0`, _**does**_ work which leads me to suspect that the string `"false"`
   doesn’t end up getting treated as a boolean value, whereas class-frontend.php
   seems to be expecting boolean values.
 * `if ( $atts['country'] && ...`
 * i hope the above makes sense.

Viewing 1 replies (of 1 total)

 *  [dryan1144](https://wordpress.org/support/users/dryan1144/)
 * (@dryan1144)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/boolean-shortcode-options-not-interpreted-correctly/#post-6646755)
 * Confirming this same issue: attr=”0″ works but attr=”false” does not. Maybe docs
   just need to be updated to use 0’s and 1’s?
 * Thanks!

Viewing 1 replies (of 1 total)

The topic ‘boolean shortcode options not interpreted correctly’ is closed to new
replies.

 * ![](https://ps.w.org/wp-store-locator/assets/icon-256x256.jpg?rev=1007784)
 * [WP Store Locator](https://wordpress.org/plugins/wp-store-locator/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-store-locator/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-store-locator/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-store-locator/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-store-locator/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-store-locator/reviews/)

## Tags

 * [boolean](https://wordpress.org/support/topic-tag/boolean/)
 * [shortcode](https://wordpress.org/support/topic-tag/shortcode/)

 * 1 reply
 * 2 participants
 * Last reply from: [dryan1144](https://wordpress.org/support/users/dryan1144/)
 * Last activity: [10 years, 7 months ago](https://wordpress.org/support/topic/boolean-shortcode-options-not-interpreted-correctly/#post-6646755)
 * Status: not resolved