If you are building something like a shortcode, or adding one it, it is highly recommended to put that functionality into a WP Plugin. While that "making a plugin" probably sounds super hard, it is actually really easy.
With something like a shortcode, you generally do not want to build them into themes (if that is even what you are looking to do).
Explains everything, how to set it up, for a shortcode, I would recommend the /mu-plugins/ (option 1) which will make it theme independent, always "on", and you don't have to look at it in your plugins list. :P
Hi there,
Is it possible to include a PHP file for a shortcode? I tried Googling, but nothing relevant came up...
Thank you, Steph
@StephBertha, this may help, http://www.amberpanther.com/contributions/wp-include-file/
also, http://wordpress.stackexchange.com/questions/49675/include-php-file-in-content-using-shortcode
If you are building something like a shortcode, or adding one it, it is highly recommended to put that functionality into a WP Plugin. While that "making a plugin" probably sounds super hard, it is actually really easy.
With something like a shortcode, you generally do not want to build them into themes (if that is even what you are looking to do).
There is well laid out information on this by Justin Tadlock, http://justintadlock.com/archives/2011/02/02/creating-a-custom-functions-plugin-for-end-users
Explains everything, how to set it up, for a shortcode, I would recommend the /mu-plugins/ (option 1) which will make it theme independent, always "on", and you don't have to look at it in your plugins list. :P
ChrisP,
Thanks for the first link. I tried them both, but the first one did the trick. Didn't want to use a plugin, but I'll stick with it :) Thanks!
Scottnix,
That's interesting what Justin talks about. A good way to future proof it. Going to continue reading, thank you!