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

  1. Magistar
    Posted 2 years 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
    Posted 2 years 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 } ?>

Topic Closed

This topic has been closed to new replies.

About this Topic