2013-06-08, 17:23:45
I have image viewer plugin and I would like to put in the template.php file. Can this be done and how? ![Rolleyes Rolleyes](http://get-simple.info/forums/images/smilies/rolleyes.gif)
Thank you
![Rolleyes Rolleyes](http://get-simple.info/forums/images/smilies/rolleyes.gif)
Thank you
Add plugin to theme
|
2013-06-08, 17:23:45
I have image viewer plugin and I would like to put in the template.php file. Can this be done and how?
![]() Thank you
2013-06-08, 17:51:57
Is this a full GetSimple plugin or a php script? If it is the latter, you can add the functions in the script to a file called 'functions.php' in your theme folder and call the functions in your template.php file.
(If it is the former...why do you want to put a plugin into the template? If the theme depends on the plugin working, you can provide the zip file with the theme in a /theme/ folder and the plugin in a /plugins/ folder so that when the user unzips the file onto their site, they have the plugin on their installation (they'd still need to enable it from the Plugins page).
2013-06-08, 20:15:42
(2013-06-08, 17:51:57)Angryboy Wrote: Is this a full GetSimple plugin or a php script? If it is the latter, you can add the functions in the script to a file called 'functions.php' in your theme folder and call the functions in your template.php file. It is a full GetSimple plugin... It is an image rotator... I would like to have images rotating on every page in the header section...
2013-06-08, 23:30:25
Oh, so are you asking how to have the plugin actually be called by the theme? (if so then you are looking for the theme hook that can call the plugin in your theme header - add this to your main plugin file):
Code: add_action('theme-header', 'name_of_image_rotator_function', array()); (Sorry if I've still misunderstood your request...) |
« Next Oldest | Next Newest »
|