Title: Better document shortcode logic
Last modified: August 30, 2016

---

# Better document shortcode logic

 *  Resolved [Clifford Paulick](https://wordpress.org/support/users/cliffpaulick/)
 * (@cliffpaulick)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/better-document-shortcode-logic/)
 * > Show widget when the shortcode …
   >  The shortcode is executed on the page where
   > the widget is configured. The match needs to be exact and is case sensative.
   > So, “a match” is not “A match” is not “a Match”. YES/ no Except when the…: 
   > Shortcode ___ MATCHES ___
 * I want this:
    If the page I’m on has a `[gravityform]` shortcode in the page 
   content, then do not display this widget.
 * Is that how it works? If not, please explain (possibly add to the FAQs tab of
   this plugin).
 * tyvm for this plugin
 * [https://wordpress.org/plugins/dynamic-widgets/](https://wordpress.org/plugins/dynamic-widgets/)

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

 *  Plugin Contributor [Qurl](https://wordpress.org/support/users/qurl/)
 * (@qurl)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/better-document-shortcode-logic/#post-6460534)
 * No, that’s not how it works.
    The output content of the shortcode is matched.
 * So, if a shortcode returns the value “1”, that value is being matched.
 *  Thread Starter [Clifford Paulick](https://wordpress.org/support/users/cliffpaulick/)
 * (@cliffpaulick)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/better-document-shortcode-logic/#post-6460614)
 * gotcha. But is it looking at shortcodes from the page the widget is on or from
   the widget’s own content?
    Also, maybe add a generic search phrase (like I was
   trying to do): if “[gravityform” is found in page content, don’t display widget.
 * Whatever logic is available, please update FAQs so all can benefit from this 
   information.
 * And tyvm for this plugin!

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

The topic ‘Better document shortcode logic’ is closed to new replies.

 * ![](https://ps.w.org/dynamic-widgets/assets/icon-256x256.png?rev=2968917)
 * [Dynamic Widgets](https://wordpress.org/plugins/dynamic-widgets/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/dynamic-widgets/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/dynamic-widgets/)
 * [Active Topics](https://wordpress.org/support/plugin/dynamic-widgets/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/dynamic-widgets/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/dynamic-widgets/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [Clifford Paulick](https://wordpress.org/support/users/cliffpaulick/)
 * Last activity: [10 years, 9 months ago](https://wordpress.org/support/topic/better-document-shortcode-logic/#post-6460614)
 * Status: resolved