Title: Multiple Parameters for a Shortcode
Last modified: August 20, 2016

---

# Multiple Parameters for a Shortcode

 *  [Abhik](https://wordpress.org/support/users/itsabhik/)
 * (@itsabhik)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/multiple-parameters-for-a-shortcode/)
 * Hello,
    I am working on building some shortcodes for my blog. I can set a single
   parameter for my shortcode, but not sure how to set different parameter.
 * For example, I can use `[myshortcode myvalue]` to output a html block within 
   the post content.
 * Now, how can I use `[myshortcode myothervalue]` to output a different block of
   html?
 * Please note that the shortcode is same, only the parameter is changed.

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

 *  [Michael](https://wordpress.org/support/users/alchymyth/)
 * (@alchymyth)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/multiple-parameters-for-a-shortcode/#post-3433489)
 * review:
 * [http://codex.wordpress.org/Shortcode_API](http://codex.wordpress.org/Shortcode_API)
 * try to use attributes, so you can use, for example:
 * `[myshortcode value="my"]`
    and `[myshortcode value="myother"]`
 *  Thread Starter [Abhik](https://wordpress.org/support/users/itsabhik/)
 * (@itsabhik)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/multiple-parameters-for-a-shortcode/#post-3433495)
 * alchymyth,
    Thanks for replying. I know I can do that, but that’s not exactly
   what I want.
 * Is there anything that serves my requirements?
 *  [Michael](https://wordpress.org/support/users/alchymyth/)
 * (@alchymyth)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/multiple-parameters-for-a-shortcode/#post-3433553)
 * >  the shortcode is same, only the parameter is changed.
 * that is usually doen with the attributes.
 * > Is there anything that serves my requirements?
 * possibly start by posting the code of your existing shortcode – this might help
   to explain what you want.
 * what stops you to use two different shortcodes?

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

The topic ‘Multiple Parameters for a Shortcode’ is closed to new replies.

## Tags

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

 * In: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
 * 3 replies
 * 2 participants
 * Last reply from: [Michael](https://wordpress.org/support/users/alchymyth/)
 * Last activity: [13 years, 4 months ago](https://wordpress.org/support/topic/multiple-parameters-for-a-shortcode/#post-3433553)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
