-
AuthorPosts
-
December 15, 2015 at 6:51 pm #708308
Hello,
Another X Theme install. Maybe my 5th?
I’m using a child theme and I want to enter css and scripts into the header but I cant find it.
Help!
π
A crazy combo of this stuff:
<link rel=”stylesheet” type=”text/css” href=”https://www.radionomy.com/css/reset.css?v090115″>
<link rel=”stylesheet” type=”text/css” href=”https://www.radionomy.com/css/style.css?v090115″>
<link rel=”stylesheet” type=”text/css” href=”https://www.radionomy.com/css/responsive.css?v171214″>
<link rel=”stylesheet” type=”text/css” href=”https://www.radionomy.com/css/jquery.mmenu.all.css?v171214″>
<link rel=”stylesheet” type=”text/css” href=”https://www.radionomy.com/css/colorpicker.css?v171214″>
<link rel=”stylesheet” type=”text/css” href=”https://www.radionomy.com/css/slick.css?v171214″>
<link rel=”stylesheet” type=”text/css” href=”https://www.radionomy.com/css/modif.css?v290515″>
<link rel=’stylesheet’ type=’text/css’ href=’//fonts.googleapis.com/css?family=Open+Sans:300,400,600,700′>
<style>
.homeBackground { background: url(https://www.radionomy.com/images/home/justin.jpg) center center; -webkit-background-size: cover; -moz-background-size: cover; background-size: cover; height: 100%; }
</style><script type=”text/javascript” src=”https://www.radionomy.com/js/jquery.min.js?v171214″></script>
<script type=”text/javascript” src=”https://www.radionomy.com/js/jquery.jplayer.min.js?v171214″></script>
<script type=”text/javascript” src=”https://www.radionomy.com/js/jquery.mmenu.min.all.js?v171214″></script>
<script type=”text/javascript” src=”https://www.radionomy.com/js/jquery.cookie.js”></script>
<script type=”text/javascript” src=”https://www.radionomy.com/js/radionomy.player.js?v191214″></script>
<script type=”text/javascript” src=”https://www.radionomy.com/js/common.js?v300915″></script>
<script type=”text/javascript” src=”https://www.radionomy.com/js/player.js?v191214″></script>
<script type=”text/javascript” src=”https://www.radionomy.com/js/website.js?v03042015″></script>
<script type=”text/javascript” src=”https://www.radionomy.com/js/colorpicker.js?v171214″></script>
<script type=”text/javascript” src=”https://www.radionomy.com/js/slick.min.js?v171214″></script>
<script type=”text/javascript” src=”https://www.radionomy.com/js/blur.min.js?v171214″></script>
<script type=”text/javascript”>
$(function () {
AddToHistory(‘/en/radio/animeradioexperience/share’);
});
</script>December 15, 2015 at 10:54 pm #708496Hi there,
Thanks for writing in! Add the scripts with following format in functions.php of child theme
function theme_name_scripts() { wp_enqueue_script('myscript', 'https://www.url/of/file/script.js'__FILE__); wp_enqueue_style('mystyle', 'https://www.url/of/file/style.css'__FILE__); } add_action( 'wp_enqueue_scripts', 'theme_name_scripts' );
You need to replace https://www.url/of/file/script.js with URL of your JavaScript and https://www.url/of/file/style.css with URL of your CSS file. Add more files in same way.
Hope this helps.
Thanks
December 16, 2015 at 11:36 am #709428Thanks! I did it and I get this error message:
Parse error: syntax error, unexpected ‘__FILE__’ (T_FILE) in /home/content/p3pnexwpnas05_data02/32/2949032/html/wp-content/themes/x-child/functions.php on line 25
December 16, 2015 at 11:53 am #709457thank you
December 16, 2015 at 12:01 pm #709481Hi There,
Please update the previous code a bit:
function theme_name_scripts() { //add the Javascript file wp_enqueue_script('myscript', 'https://www.url/of/file/script.js'); //add the CSS file wp_enqueue_style('mystyle', 'https://www.url/of/file/style.css'); } add_action( 'wp_enqueue_scripts', 'theme_name_scripts' );
Let us know how it goes!
January 19, 2016 at 5:38 pm #753891This worked out great btw. Thank you.
January 19, 2016 at 5:44 pm #753905Youβre most welcome! π
-
AuthorPosts