Navigation
This is archived content. Visit our new forum.
  • Author
    Posts
  • #166936

    thecashbag
    Participant

    I’m trying to install https://www.tidiochat.com/ on my site.

    For the installation it wants me to add code to the Header.php file just before the </head> tag. I was hoping to add this via the Customizer as I don’t want to create a child theme, and I want to keep Theme X upgrade proof.

    So in the Customizer I add this code:

    <script src="//code.tidio.co/a0nkzkdpu1d7qlopnjvwjshl39d1ai5c.js"></script>

    I open the customizer, go to the Custom section, and in the JavaScript box I paste that code. But it isn’t working. I think it may have something to do with how it says “Do not place any <style> or <script> tags in these areas as they are already added for your convenience.” How do I add that code without the script parts? I tried to edit out those parts but I think I did it wrong as it wasn’t working.

    #167284

    John Ezra
    Member

    Hi there,

    The best way to get this done is to create a child theme. You can download our child themes and just install them.

    Please review how to setup a child theme.
    Also make sure you take a look at our Customization Best Practices.

    Once you have that done.

    copy the “_header.php” file from the following path “/wp-content/themes/x/framework/views/global/_header.php”

    and paste it in the exact path in your child theme.
    /wp-content/themes/x-child-integrity-light/framework/views/global/_header.php

    Note: You would need to change “x-child-integrity-light” to the child theme you are using (you weren’t able to give us your URL so I couldn’t tailor it for you)

    Finally you can add your code before the closing </head> tag.

    Hope this helps!

    #369407

    Kevin Bond
    Participant

    Thanks!

    #369589

    Christopher
    Moderator

    You’re welcome.

    #373154

    iceman600
    Participant

    Is this necessary on using a child theme?

    copy the “_header.php” file from the following path “/wp-content/themes/x/framework/views/global/_header.php”
    
    and paste it in the exact path in your child theme.
    /wp-content/themes/x-child-integrity-light/framework/views/global/_header.php

    I notice that the views folder in child theme are all empty for ethos,icon, global, integrity and renew.

    #373324

    Rue Nel
    Moderator

    Hello There,

    Thanks for updating the thread!
    Yes it is necessary. That is how you override the template file in the parent theme. For more details on the best customization practices, please check out our knowledge base here: https://community.theme.co//kb/customization-best-practices/

    Thank you.

    #373619

    iceman600
    Participant

    Here is what i experienced in adding a code to the header.php:

    I put the Header with my google manager tag on the views folder on ethos folder since thats what theme im using and the code didnt trigger. So what i did is copy the header.php and put in global folder and the trigger fired.

    question: do i have to put the header tag on the global folder and the theme folder that im using for a code to trigger?

    #373624

    Thai
    Moderator

    Hi @iceman600,

    You just need to copy the _header.php file to the global directory.

    In the same path of X parent theme:

    – x/framework/views/global/_header.php
    – x-child/framework/views/global/_header.php

    Regards!

    #373651

    iceman600
    Participant

    Thank you so mch you rock for replying so fast 🙂

    #373653

    Thai
    Moderator

    You’re most welcome 🙂

    #651622

    jimstod
    Participant

    Are there any plans to add a custom code section to the customizer? Even basic themes not specifically focused on marketing usually include the option vs. having to create a child theme and modify the code…It’s not like tracking conversions, etc. is a rare, unusual or new thing in digital marketing except for beginners…or is it too difficult with the various layouts available?

    #651726

    Rupok
    Member

    Hi @jimstod

    Thanks for updating. We certainly appreciate the feedback! This is something we can add to our list of feature requests. This way it can be taken into consideration for future development. All of these items are discussed with our team internally and prioritized based on the amount of interest a particular feature might receive. Thanks!

    #760196

    ibracedirector2016
    Participant

    Hi, I’m trying to add the following Javascript to my header, and I think i’ve done it correctly but still the widgets that it is supposed to activate on my page aren’t working.

    I’ve added the following script to the Functions.php file on my child theme:

    // Additional Functions
    // =============================================================================

    add_action(‘wp_head’,’custom_script’);
    function custom_script() {
    ?>
    <script>

    <script type=”text/javascript” src=”//js.causevox.com/v2″></script>

    <script type=”text/javascript”>

    CV.setDomain(“projectneverest.causevox.com”);

    </script>
    <?php
    }

    I’m trying to integrate this:
    http://support.causevox.com/hc/en-us/articles/204717759-Widget-API-Documentation

    I’ve added the widgets into the raw content element.

    You can see my attempts on http://www.projectneverest.com

    Any help would be greatlty appreciated

    #760551

    Thai
    Moderator

    Hi @ibracedirector2016,

    Please update your code to this:

    add_action('wp_head','custom_script');
    function custom_script() {
    ?>
    <script type="text/javascript" src="//js.causevox.com/v2"></script>
    
    <script type="text/javascript">
    
    	CV.setDomain("projectneverest.causevox.com");
    
    </script>
    <?php
    }

    Hope it helps 🙂

    #761852

    ibracedirector2016
    Participant

    Hi, Ive placed this in the header but maybe i’m not deploying it correctly in the page.

    What way do you think is best to implement these in the site? http://support.causevox.com/hc/en-us/articles/204717759-Widget-API-Documentation

    Jackson