Tagged: 

Viewing 20 posts - 1 through 20 (of 20 total)
  • Author
    Posts
  • #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

    #552618

    Hi havi!

    Try the solution here
    https://kriesi.at/support/topic/add-script-to-head/

    it is the easiest and the fastest for you!

    Cheers!
    Basilis

    #553220

    Thank you, Basilis!! I’ll begin to implement right now!! :)

    #553226

    Hey!

    You can add your code in to Google Analytics field in Enfold theme options as well

    Regards,
    Yigit

    #553228

    Really, 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!!! :)

    #553232

    Hey!

    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,
    Yigit

    #553236

    Done!! 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?

    #553237

    Hey!

    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,
    Yigit

    #553246

    Not at all, Yigit! Adding it below!! :)

    Thank you so much!!!

    Warmly,

    Havi

    #553249

    Hey!

    Please see screenshot below. If it is not functioning correctly, please post login credentials here as well :)

    Cheers!
    Yigit

    #553252

    You got it, Yigit!

    #553256

    Hi!

    Can you please check it now?

    Regards,
    Yigit

    #553264

    Hi 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?

    #553269

    Hi!

    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,
    Yigit

    #553274

    Thank 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

    #553281

    Hey!

    We will be waiting to hear from you!

    Cheers!
    Yigit

    #553960

    Hi 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

    #553984

    Hey 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,
    Yigit

    #554053

    Hi 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

    #554055

    Hey!

    You are welcome! Glad it works. Please make sure to disable browser add-ons such as AdBlock to see your ad on your site :)

    Cheers!
    Yigit

Viewing 20 posts - 1 through 20 (of 20 total)
  • The topic ‘Adding Custom Javascript to Header’ is closed to new replies.