Skip to:
Content
Pages
Categories
Search
Top
Bottom

Plugin Help


  • bbolman
    Participant

    @bbolman

    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.

Viewing 3 replies - 1 through 3 (of 3 total)

  • ardentfrost
    Member

    @ardentfrost

    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.


    so1o
    Participant

    @so1o

    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

    }

    ?>


    bbolman
    Participant

    @bbolman

    thanks so much.

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.
Skip to toolbar