WordPress.org

Ready to get started?Download WordPress

Forums

Need help adding javascript to plugin (1 post)

  1. TheRoninJedi
    Member
    Posted 2 years ago #

    First, I'm a coding newbie (but very willing to learn).

    I need to add a bit of javascript code just before the closing body tag. I already have the code and it works perfectly when I paste it into the footer.php. However, I want to make the code into a plugin so it's easily accessible to other wordpress users.

    I already have a "blank" plugin (created with the "plugin maker" plugin) with the necessities to make wordpress recognize it's existance. However, I can't figure out how to add the javascript to my website using a plugin.

    I have spent hours searching Google (and here) trying to figure out how to do this. How do I do this or Where can I go to learn this?

    Alternatively: does anyone have the code I need handy so they could paste it here with "paste-your-javascript-code-here" where I need to put my code?

    I have been here: http://codex.wordpress.org/Plugin_API/Action_Reference/wp_footer but when I tried to use the code I couldn't make it work or firgure out what I was doing wrong.

    Thanks in Advance

Topic Closed

This topic has been closed to new replies.

About this Topic