ThemeShaper Forums » Thematic

[closed]

adding javascript files

(2 posts)
  • Started 4 years ago by Angelic Dalli
  • Latest reply from helgatheviking
  • This topic is not resolved

Tags:

  1. Angelic Dalli
    Member

    Hi all,

    I am new to wordpress and also the thematic theme. I need to add a javascript file to the theme, but I cannot seem to find where the javascript files are being added.

    I think they are being added through php, but am not sure.

    Can anyone help?!!

    Thanks in advance :D

    Posted 4 years ago #
  2. adding scripts is best achieved w/ wp_enqueue_script
    http://codex.wordpress.org/Function_Reference/wp_enqueue_script

    function add_scripts(){
    wp_enqueue_script('sample script', get_bloginfo('stylesheet_directory') . '/script.js'); //calls the plugin script
    }
    add_action('init','add_scripts');
    Posted 4 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.