[resolved] Recommended way to include a JavaScript file (3 posts)

  1. MineForeman.com
    Posted 3 years ago #

    Hi All,

    Can anyone tell me the recommended method to include a new JavaScript file with the Responsive Child Theme?

    I have done a Google and found about 9 different ways so I thought I would come straight to the horses mount and ask here.

    The method I like the most is to add a functions.php to the child theme and put;-


    function myJS_link() {
    echo '<script language="javascript" src="JavaScriptFileName.js">
    </script>' . "\n";
    add_action( 'wp_head', 'myJS_link' );

    Is that a good way of doing it?

    Thanks heaps


  2. WPyogi
    Forum Moderator
    Posted 3 years ago #

    Here's the WP word on it


    But you may also want to look at Responsive's dedicated forums as Emil always has really great help for his themes:


  3. Emil Uzelac
    Theme Review Admin
    Posted 3 years ago #

    Create a functions.php in your Child Theme and see this paste please http://pastebin.com/iUynbySg


Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic