Title: [Plugin: Widget Logic] Show widget by Session
Last modified: August 20, 2016

---

# [Plugin: Widget Logic] Show widget by Session

 *  Resolved [1two3](https://wordpress.org/support/users/1two3/)
 * (@1two3)
 * [13 years, 11 months ago](https://wordpress.org/support/topic/plugin-widget-logic-show-widget-by-session/)
 * I have zero coding background, so please bear with me.
 * I am using a templatic theme ([http://templatic.com/demos/geoplaces4/](http://templatic.com/demos/geoplaces4/))
   that uses a session variable ($_SESSION[‘multi_city’]) to show custom post data
   based on which city is selected.
 * I would like to use that session data to have control over which widget shows
   for each city. Is this possible and if so could someone please help out with 
   the code to place in the widget.
 * [http://wordpress.org/extend/plugins/widget-logic/](http://wordpress.org/extend/plugins/widget-logic/)

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

 *  [alanft](https://wordpress.org/support/users/alanft/)
 * (@alanft)
 * [13 years, 11 months ago](https://wordpress.org/support/topic/plugin-widget-logic-show-widget-by-session/#post-2824865)
 * have you tried something simple like
 * $_SESSION[‘multi_city’]==’New York’
 * (or whatever) ?
 *  Thread Starter [1two3](https://wordpress.org/support/users/1two3/)
 * (@1two3)
 * [13 years, 10 months ago](https://wordpress.org/support/topic/plugin-widget-logic-show-widget-by-session/#post-2824885)
 * The simplest answers are generally the best. Thank you, that worked. I had to
   use the City ID instead of the City name.
 * Thank you alanft

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

The topic ‘[Plugin: Widget Logic] Show widget by Session’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/widget-logic_c8dde5.svg)
 * [Widget Logic](https://wordpress.org/plugins/widget-logic/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/widget-logic/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/widget-logic/)
 * [Active Topics](https://wordpress.org/support/plugin/widget-logic/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/widget-logic/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/widget-logic/reviews/)

## Tags

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

 * 2 replies
 * 2 participants
 * Last reply from: [1two3](https://wordpress.org/support/users/1two3/)
 * Last activity: [13 years, 10 months ago](https://wordpress.org/support/topic/plugin-widget-logic-show-widget-by-session/#post-2824885)
 * Status: resolved