Title: short code with a variable
Last modified: January 6, 2023

---

# short code with a variable

 *  Resolved [pmgroupefrance](https://wordpress.org/support/users/pmgroupefrance/)
 * (@pmgroupefrance)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/short-code-with-a-variable/)
 * I like to create a short code with a variable that we will add when we call this
   one

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

 *  Plugin Author [DraftPress Team](https://wordpress.org/support/users/draftpress/)
 * (@draftpress)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/short-code-with-a-variable/#post-16381557)
 * Hi [@pmgroupefrance](https://wordpress.org/support/users/pmgroupefrance/) Can
   you kindly explain a little more what you are trying to do?
   Thank you.
 *  Thread Starter [pmgroupefrance](https://wordpress.org/support/users/pmgroupefrance/)
 * (@pmgroupefrance)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/short-code-with-a-variable/#post-16381713)
 * So basically
   Create a shortcode and add a parameter to it that will affect when
   calling the style shortcode
 * [hfcm id=”12″ size=”medium”]
 * size is the variable
 *  Plugin Author [DraftPress Team](https://wordpress.org/support/users/draftpress/)
 * (@draftpress)
 * [3 years, 2 months ago](https://wordpress.org/support/topic/short-code-with-a-variable/#post-16525409)
 * Ok. Now I understand. Unfortunately, that would not make sense to put into HFCM’s
   shortcode. You’d be better off creating the shortcode separately and then using
   HFCM to place it on the pages you wish to trigger it. 
   Trying to integrate it
   into any other plugin’s shortcode is not the right way to implement what you 
   described for several reasons, such as forward compatability, security, etc.Hope
   that helps.

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

The topic ‘short code with a variable’ is closed to new replies.

 * ![](https://ps.w.org/header-footer-code-manager/assets/icon-256x256.png?rev=2681303)
 * [Header Footer Code Manager](https://wordpress.org/plugins/header-footer-code-manager/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/header-footer-code-manager/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/header-footer-code-manager/)
 * [Active Topics](https://wordpress.org/support/plugin/header-footer-code-manager/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/header-footer-code-manager/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/header-footer-code-manager/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [DraftPress Team](https://wordpress.org/support/users/draftpress/)
 * Last activity: [3 years, 2 months ago](https://wordpress.org/support/topic/short-code-with-a-variable/#post-16525409)
 * Status: resolved