Tagged: header
-
AuthorPosts
-
December 14, 2015 at 7:42 pm #552573
Hi guys!!! :)
I need to add the attached javascript between <head> </head> and I found two solutions but I don’t know which one I should follow.
#1- https://kriesi.at/support/topic/custom-js/
#2- https://kriesi.at/support/topic/add-script-to-head/
What do you recommend? Of course, it will go on the Child Theme. ;)
Thank you soooo much!!!
Warmly,
Havi
December 14, 2015 at 9:43 pm #552618Hi havi!
Try the solution here
https://kriesi.at/support/topic/add-script-to-head/it is the easiest and the fastest for you!
Cheers!
BasilisDecember 15, 2015 at 7:01 pm #553220Thank you, Basilis!! I’ll begin to implement right now!! :)
December 15, 2015 at 7:11 pm #553226Hey!
You can add your code in to Google Analytics field in Enfold theme options as well
Regards,
YigitDecember 15, 2015 at 7:15 pm #553228Really, Yigit? That would make my life so much easier!!! I was already searching on how to create and name a custom .js file!!! If you are sure, then I’m going for it!!! :)
December 15, 2015 at 7:30 pm #553232Hey!
Sorry, i missed “to header” part. Please add following code to Functions.php file of your child theme
function add_custom_code(){ ?> YOUR CODE GOES HERE <?php } add_action('wp_head', 'add_custom_code');
Best regards,
YigitDecember 15, 2015 at 7:38 pm #553236Done!! I added the code below to the child’s functions.php file. I don’t see anything happening yet but maybe the publisher needs to start the campaign?
December 15, 2015 at 7:48 pm #553237Hey!
If you do not mind posting a link to your website, we can check the source code to see if it is being applied or not :)
Regards,
YigitDecember 15, 2015 at 8:10 pm #553246Not at all, Yigit! Adding it below!! :)
Thank you so much!!!
Warmly,
Havi
December 15, 2015 at 8:24 pm #553249Hey!
Please see screenshot below. If it is not functioning correctly, please post login credentials here as well :)
Cheers!
YigitDecember 15, 2015 at 8:36 pm #553252You got it, Yigit!
December 15, 2015 at 8:49 pm #553256December 15, 2015 at 9:00 pm #553264Hi Yigit!!
I think they need to activate it or we won’t see anything ;)
I’ll let you know as soon as they let me know it’s active. :)
Thank you so much!!!
Warmly,
Havi
PS: Could you please tell me what changed, so I don’t mess it up?December 15, 2015 at 9:11 pm #553269Hi!
I removed doubled and single quotes and entered them once again manually. When you copy them from here or from email, sometimes they are converted.
We will keep the thread open and wait to hear from you. It will be on hold until you reply, so please reply when you would like us to mark the thread as resolved or assist you further :)
Regards,
YigitDecember 15, 2015 at 9:19 pm #553274Thank you, Yigit!! ;) Yes, that happens a lot with special characters!!!
I’m sure I’ll hear something from these people tomorrow as they are in Spain and not it’s pretty late there ;)
Warmly,
Havi
December 15, 2015 at 9:42 pm #553281December 16, 2015 at 8:29 pm #553960Hi Yigit!!
It’s not working :(
Should I try the other method or would you like to take a look at it first? I do see between <head> and </head> is it calling jQuery twice?
Thank you for all your help!!!
Warmly,
Havi
December 16, 2015 at 9:25 pm #553984Hey Havi!
You can edit header.php file and add the code there as well but your code might be correct. Where have you got the code and what exactly would you like it to do? :)
Regards,
YigitDecember 16, 2015 at 10:56 pm #554053Hi Yigit!
The code was given by billymob of mobile advertising and I think we were checking on desktop… I just tried on mobile and it works!
Thank you soooo much!
Warmly,
Havi
December 16, 2015 at 11:08 pm #554055 -
AuthorPosts
- The topic ‘Adding Custom Javascript to Header’ is closed to new replies.