Title: Create shortcodes
Last modified: October 17, 2018

---

# Create shortcodes

 *  Resolved [luhmanr](https://wordpress.org/support/users/luhmanr/)
 * (@luhmanr)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/create-shortcodes/)
 * I am not sure where to do for this question so I guess I will start here. My 
   current scenario would be to create dozens of pages each with a shortcode that
   varies by one parameter. Is there a way to pass a shortcode from one page to 
   another and have it executed on the second page. Thus, my dozens of pages goes
   down to two pages.
 * I would envision one page with a dropdown list that includes.
 * [shortcode1]
    [shortcode2] [shortcode3] etc.
 * A user would select from the dropdown and that is passed to a second page in 
   which the shortcode is executed.
 * How can this be done.

Viewing 1 replies (of 1 total)

 *  Plugin Author [Vova](https://wordpress.org/support/users/gn_themes/)
 * (@gn_themes)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/create-shortcodes/#post-10789955)
 * Hi [@luhmanr](https://wordpress.org/support/users/luhmanr/),
 * this question isn’t related to Shortcodes Ultimate itself, so I mark it as resolved.
 * You can try to do the following:
 * At `page-1`:
 *     ```
       <form action="/page-2" method="get">
         <select name="my_action">
           <option value="action-1">Action 1</option>
           <option value="action-2">Action 1</option>
         </select>
       </form>
       ```
   
 * At `page-2`, or within your custom shortcode, added to page-2:
 *     ```
       if ( isset( $_GET['my_action'] ) ) {
         $action = sanitize_key( $_GET['my_action'] );
         if ( 'action-1' === $action ) {
           do_stuff();
         }
       }
       ```
   

Viewing 1 replies (of 1 total)

The topic ‘Create shortcodes’ is closed to new replies.

 * ![](https://ps.w.org/shortcodes-ultimate/assets/icon-256x256.gif?rev=2547563)
 * [Shortcodes Ultimate - Content Elements](https://wordpress.org/plugins/shortcodes-ultimate/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/shortcodes-ultimate/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/shortcodes-ultimate/)
 * [Active Topics](https://wordpress.org/support/plugin/shortcodes-ultimate/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/shortcodes-ultimate/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/shortcodes-ultimate/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Vova](https://wordpress.org/support/users/gn_themes/)
 * Last activity: [7 years, 7 months ago](https://wordpress.org/support/topic/create-shortcodes/#post-10789955)
 * Status: resolved