Forums

Join
bbPress Support ForumsPluginsPlugin Help

Info

Tags

Plugin Help

  1. 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.

  2. 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.

  3. 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
    }
    ?>

  4. thanks so much.

  5. You must log in to post.