• Resolved halben

    (@halben)


    So, What is the most efficient way to add a javascript file to a child theme?

    1) Create a header.php and upload to child theme folder and add:
    <script type="text/javascript" src="<?php bloginfo('template_url'); ?>/pathto/yourscript.js"></script>

    or

    2) Go to child theme functions.php and insert:

    add_action('wp_head', 'header_addons');
    function header_addons(){
    }

    Thanks,
    Halben

Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Child theme: Most eficient way of adding javascript to the header.php?’ is closed to new replies.