Title: [Plugin: My Shortcodes] PHP functions double inserted
Last modified: August 20, 2016

---

# [Plugin: My Shortcodes] PHP functions double inserted

 *  Resolved [ClubMagellano](https://wordpress.org/support/users/clubmagellano/)
 * (@clubmagellano)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/plugin-my-shortcodes-php-functions-double-inserted/)
 * Hi tehre,
    today I’ve made a shortcodes and I used some PHP functions so I’ve
   put them in the relative section. But I’have to load this shortcode at least 
   2 times per page so I got an error because, according to my log, I’m trying do
   define twice the functions. I’ve resolved putting functions in functions.php 
   but I hope there’s a way to solve this problem in the plugin. Looking forward
   in hearing you. Riccardo.
 * [http://wordpress.org/extend/plugins/my-shortcodes/](http://wordpress.org/extend/plugins/my-shortcodes/)

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

 *  Plugin Author [David Cramer](https://wordpress.org/support/users/desertsnowman/)
 * (@desertsnowman)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/plugin-my-shortcodes-php-functions-double-inserted/#post-3107264)
 * Hi There,
 * I know about this problem and do need to make a fix.
 * For now you can wrap your function in this:
 *     ```
       if(!function_exists('your-first-function-name')){
   
       // all your functions go here
   
       }
       ```
   
 * this will allow it to be used multiple times. I will get a patch up asap, I’m
   just a little busy at the moment.
 * ~David
 *  Thread Starter [ClubMagellano](https://wordpress.org/support/users/clubmagellano/)
 * (@clubmagellano)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/plugin-my-shortcodes-php-functions-double-inserted/#post-3107430)
 * Ok thank you very much!
 *  Plugin Author [David Cramer](https://wordpress.org/support/users/desertsnowman/)
 * (@desertsnowman)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/plugin-my-shortcodes-php-functions-double-inserted/#post-3107517)
 * You’re welcome.

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

The topic ‘[Plugin: My Shortcodes] PHP functions double inserted’ is closed to new
replies.

 * ![](https://s.w.org/plugins/geopattern-icon/my-shortcodes_f6e3df.svg)
 * [My Shortcodes](https://wordpress.org/plugins/my-shortcodes/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/my-shortcodes/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/my-shortcodes/)
 * [Active Topics](https://wordpress.org/support/plugin/my-shortcodes/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/my-shortcodes/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/my-shortcodes/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [David Cramer](https://wordpress.org/support/users/desertsnowman/)
 * Last activity: [13 years, 7 months ago](https://wordpress.org/support/topic/plugin-my-shortcodes-php-functions-double-inserted/#post-3107517)
 * Status: resolved