Title: Pass parameters through the shortcode?
Last modified: October 12, 2019

---

# Pass parameters through the shortcode?

 *  [nathanarcher](https://wordpress.org/support/users/nathanarcher/)
 * (@nathanarcher)
 * [6 years, 8 months ago](https://wordpress.org/support/topic/pass-parameters-through-the-shortcode/)
 * Is there a way to pass parameters through the plug-in?
 * It appears the plugin uses the parameters function to pass the ID of the shortcode,
   but I’m trying to pass additional parameters through which doesn’t appear to 
   be working.
 * I found that I can create my own custom shortcodes by editing functions.php and
   including a different shortcode file that can pass parameters, but while that
   works these lines in functions.php crash the rest of the shortcodes and most 
   of my site.
 *     ```
           include_once "/var/chroot/home/content/p3pnexwpnas11_data02/53/41840853/html/wp-content/apps/php_files/submissions_code/load_post_previews_show_larger_shortcode.php";
   
           add_shortcode( 'load_meme_preview', 'load_post_previews_show_larger_shortcode' );
       ```
   
 * Is there any way I can either pass parameters or stop the plug-in from crashing
   my site without replacing all of my previous plug-ins manually?

Viewing 1 replies (of 1 total)

 *  [Temyk](https://wordpress.org/support/users/webtemyk/)
 * (@webtemyk)
 * [6 years, 7 months ago](https://wordpress.org/support/topic/pass-parameters-through-the-shortcode/#post-12026138)
 * Hello.
 * In the snippet parameters there is a field **Available attributes**.
 * **Available attributes** for shortcode via comma. Only numbers, letters and underscore
   characters are allowed. Attribute id is always available. With this option you
   can set additional attributes for the shortcode. Example: start_date attribute
   to [wbcr_php_snippet id=’xxx’ start_date=’2018/01/15′] shortcode. Now we can 
   get attribute value in the snippet with the $start_date variable. It’s convenient
   if you want to print out different results depending on this attributes.

Viewing 1 replies (of 1 total)

The topic ‘Pass parameters through the shortcode?’ is closed to new replies.

 * ![](https://ps.w.org/insert-php/assets/icon-256x256.gif?rev=3523853)
 * [Woody Code Snippets – Insert PHP, CSS, JS, and Header/Footer Scripts](https://wordpress.org/plugins/insert-php/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/insert-php/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/insert-php/)
 * [Active Topics](https://wordpress.org/support/plugin/insert-php/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/insert-php/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/insert-php/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Temyk](https://wordpress.org/support/users/webtemyk/)
 * Last activity: [6 years, 7 months ago](https://wordpress.org/support/topic/pass-parameters-through-the-shortcode/#post-12026138)
 * Status: not resolved