WordPress.org

Forums

[resolved] Adding script to bottom of wordpress (2 posts)

  1. Magistar
    Member
    Posted 11 months ago #

    Hi there I am doing some website optimizations and I want to get rid of:

    <script src="http://static.rifthead.com/tooltips.js"></script> in my headers.

    I have been googling for the "proper" way to do this. This seemed a decent match: http://www.wpbeginner.com/wp-tutorials/how-to-properly-add-javascripts-and-styles-in-wordpress/

    However I am afraid it is a bit too complicated for me.

    Is there someone that is willing so suggest how I inject this script to the bottem of my pages?

  2. Magistar
    Member
    Posted 11 months ago #

    I added this code in footer.php

    <?php if (in_category( array(6,7,8,9 ))) { ?>
    					<script src="http://static.rifthead.com/tooltips.js"></script>
    					<?php } ?>

Reply

You must log in to post.

About this Topic