WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Which file to add code to load javascript (3 posts)

  1. imjscn
    Member
    Posted 4 years ago #

    I want to add an external javascript. WP documents said I either need to add code in header.php or add code in functions.php.
    I find out I have header.php in each of the 2 themes that comes with WP, but in the theme that I currently use, there's no header.php.

    So, now I try the 2nd method, to add code in functions.php, but I find that beside one in includes folder, each theme folder has one functions.php.

    Which functions.php is the file I should add the javascript code?

    Thanks for helping!

  2. Samuel B
    moderator
    Posted 4 years ago #

    the theme's functions.php

  3. imjscn
    Member
    Posted 4 years ago #

    Thanks!

Topic Closed

This topic has been closed to new replies.

About this Topic