WordPress.org

Ready to get started?Download WordPress

Forums

JavaScript in Default Template (2 posts)

  1. savemore
    Member
    Posted 8 years ago #

    Hi,
    I need to put a js in between the head tags in wp default theme template. I opened up header.php

    and place the script in between,

    <?php wp_head(); ?>

    </head>

    is this correct? or am I suppose to put the script in the index.php page within the template? in the wp-content/themes/default/index.php

    i tried putting the script underneath <?php get_header(); ?>, but no avail

    what am I doing wrong? thanks

    i want the js to execute upon the home page of my blog or any of its posts.

  2. Mark (podz)
    Support Maven
    Posted 8 years ago #

    Above this line will be fine:

    </head>

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.