Title: Make a dynamic shortcode
Last modified: August 19, 2016

---

# Make a dynamic shortcode

 *  [daryan](https://wordpress.org/support/users/daryan/)
 * (@daryan)
 * [15 years, 1 month ago](https://wordpress.org/support/topic/make-a-dynamic-plugin-tag/)
 * I have a plugin to be inserted on a page simply asks me to add a shortcode in
   the page.
    Ex: [PluginName dl=3 tpl=8]
 * It works very well but I wish this tag changes according to the url of the page.
   
   Eg [http://something.com/page/?dl=2](http://something.com/page/?dl=2) show [PluginName
   dl=2 tpl=8] [http://something.com/page/?dl=3](http://something.com/page/?dl=3)
   show [PluginName dl=3 tpl=8]
 * I thought of doing it via the template page where I could easily retrieve the
   variable in the url with a php function. Where I block is how to call the plugin,
   passing it the right variable? Is there a way to know what php function is called
   by the shortcode?
 * Thank you for your help,

The topic ‘Make a dynamic shortcode’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 0 replies
 * 1 participant
 * Last reply from: [daryan](https://wordpress.org/support/users/daryan/)
 * Last activity: [15 years, 1 month ago](https://wordpress.org/support/topic/make-a-dynamic-plugin-tag/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
