Info
- 4 posts
- 3 voices
- Started 5 years ago by bbolman
- Latest reply from bbolman
- This topic is not a support question
Plugin Help
-
- Posted 5 years ago #
Alright, so I'm writing a really small simple plugin, and I want to actually do it in good plugin form, which I don't know all too well, so what I want to know is, how do I get my plugin to just add a couple lines to the header of each template? I want to have the header call upon a few javascript files and a css file.
Thanks for any help.
-
- Posted 5 years ago #
You'll have to either include an adjusted header or, more likely, just put the lines that need to be added in a readme zipped with your plugin. Since header.php is a template file, it can be changed easily by normal users. Since I have extra stuff in my header, I would have to figure out what lines you added to yours and add them to mine instead of just using the one you provide.
-
- Posted 5 years ago #
here you go bbolman
<php
add_action('bb_head' , 'my_plugin_function_name');
function my_plugin_function_name() {
?>
stuff that you want to put
<?php
}
?> -
- Posted 5 years ago #
thanks so much.
-
You must log in to post.