Title: city specific content using shortcode?
Last modified: December 18, 2017

---

# city specific content using shortcode?

 *  Resolved [coffeendonut](https://wordpress.org/support/users/coffeendonut/)
 * (@coffeendonut)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/city-specific-content-using-shortcode/)
 * Hi, is it possible to show content for a city via the [geoip_detect2 property
   =”city”] shortcode? Or perhaps through CSS/HTML somehow?
 * I noticed the in ‘API Usage Examples’ there’s a ‘Redirect depending on country’
   PHP snippet. If I have to perhaps I can do something similar for city. But what
   WordPress .php file does the snippet belong to as it doesn’t say?
 * Thanks!

Viewing 1 replies (of 1 total)

 *  [Benjamin Pick](https://wordpress.org/support/users/benjamin4/)
 * (@benjamin4)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/city-specific-content-using-shortcode/#post-9804381)
 * Maybe if you use the shortcode inside the CSS attribute?
    ` <div class="city-[
   geoip_detect2 property='city']">Text that will be shown/hidden via css</div>
 * Otherwise, you’ll need to create your own shortcode using the functions of this
   plugin for this.

Viewing 1 replies (of 1 total)

The topic ‘city specific content using shortcode?’ is closed to new replies.

 * ![](https://ps.w.org/geoip-detect/assets/icon-256x256.jpg?rev=978998)
 * [Geolocation IP Detection](https://wordpress.org/plugins/geoip-detect/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/geoip-detect/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/geoip-detect/)
 * [Active Topics](https://wordpress.org/support/plugin/geoip-detect/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/geoip-detect/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/geoip-detect/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Benjamin Pick](https://wordpress.org/support/users/benjamin4/)
 * Last activity: [8 years, 5 months ago](https://wordpress.org/support/topic/city-specific-content-using-shortcode/#post-9804381)
 * Status: resolved