Title: Passing paramaters through shortcode
Last modified: July 26, 2024

---

# Passing paramaters through shortcode

 *  Resolved [saskiaherm](https://wordpress.org/support/users/saskiaherm/)
 * (@saskiaherm)
 * [1 year, 10 months ago](https://wordpress.org/support/topic/passing-paramaters-through-shortcode/)
 * Hi, I have a simple snippet like:
 *     ```wp-block-code
       <div id="gvk_04" style="text-align: center;"></div><p align="center"><button class="spw_button" onclick=spw_gvk_expl()>Show/Hide explanation</button></p><script>function spw_gvk_expl() {	var x = document.getElementById("gvk_04");	if (x.innerHTML === "") { x.innerHTML = spw_gvk_expl_brd(4); } else { x.innerHTML = ""; }}	function spw_gvk_expl_brd(brd) {		return Hi, this is the explanation of board ${brd}}	</script>
       ```
   
 * It is toggling between showing/hiding some explanation.
 * Is it possible to pass the boardnumber (4 in the code above) as a parameter, 
   so I can use the same code for all boards? Something like
 *  [hfcm id=”123″ brd = “4”]
 * Kind regards,
 * Saskia
    -  This topic was modified 1 year, 10 months ago by [saskiaherm](https://wordpress.org/support/users/saskiaherm/).
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fpassing-paramaters-through-shortcode%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 1 replies (of 1 total)

 *  Plugin Support [DraftPress Support Team](https://wordpress.org/support/users/99robotsteam/)
 * (@99robotsteam)
 * [1 year, 10 months ago](https://wordpress.org/support/topic/passing-paramaters-through-shortcode/#post-17919827)
 * Hi [@saskiaherm](https://wordpress.org/support/users/saskiaherm/),
 * Unfortunately, our current shortcode implementation doesn’t support passing custom
   parameters like you’ve described. The shortcode only takes an ID, so something
   like [hfcm id=”123″ brd=”4″] isn’t possible with the existing functionality.
 * Let us know if you have any other questions!

Viewing 1 replies (of 1 total)

The topic ‘Passing paramaters through shortcode’ 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/)

 * 1 reply
 * 2 participants
 * Last reply from: [DraftPress Support Team](https://wordpress.org/support/users/99robotsteam/)
 * Last activity: [1 year, 10 months ago](https://wordpress.org/support/topic/passing-paramaters-through-shortcode/#post-17919827)
 * Status: resolved