bbPress

Simple, Fast, Elegant

bbPress support forums » Plugins

Plugin Help

(4 posts)
  • Started 1 year ago by bbolman
  • Latest reply from bbolman
  • This topic is not a support question

Tags:

  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.

    Posted 1 year ago #
  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.

    Posted 1 year ago #
  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
    }
    ?>

    Posted 1 year ago #
  4. thanks so much.

    Posted 1 year ago #

RSS feed for this topic

Reply

You must log in to post.

Code is Poetry.