Title: Category parameter on shortcode not working
Last modified: September 6, 2019

---

# Category parameter on shortcode not working

 *  Resolved [David Beja](https://wordpress.org/support/users/dbeja/)
 * (@dbeja)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/category-parameter-on-shortcode-not-working/)
 * Hi,
 * I’m trying to use the category parameter to restrict the store locations that
   show on the map, but the map always loads with all the stores.
    I’m using like
   this: `[wpsl template="default" category="store-cat-slug"]`
 * I don’t have any JS errors.
    Any hints of what could be the problem?
 * Thank you

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [Tijmen Smit](https://wordpress.org/support/users/tijmensmit/)
 * (@tijmensmit)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/category-parameter-on-shortcode-not-working/#post-11908639)
 * The category your trying to use does have published locations in it, that also
   have the lat / lng fields set in the admin editor?
 *  Thread Starter [David Beja](https://wordpress.org/support/users/dbeja/)
 * (@dbeja)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/category-parameter-on-shortcode-not-working/#post-11909929)
 * Thank you, Tijmen.
    It seems it was my mistake. I was adding the category slug
   via a PHP variable, but where I was calling the shortcode I didn’t have access
   to that variable. Now it’s working.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Category parameter on shortcode not working’ 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/)

 * 2 replies
 * 2 participants
 * Last reply from: [David Beja](https://wordpress.org/support/users/dbeja/)
 * Last activity: [6 years, 9 months ago](https://wordpress.org/support/topic/category-parameter-on-shortcode-not-working/#post-11909929)
 * Status: resolved