-
AuthorPosts
-
December 18, 2014 at 5:00 am #166936
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.
December 18, 2014 at 4:05 pm #167284Hi 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.phpNote: 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!
August 25, 2015 at 8:03 pm #369407Thanks!
August 26, 2015 at 12:33 am #369589You’re welcome.
August 29, 2015 at 4:42 pm #373154Is 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.
August 30, 2015 at 12:45 am #373324Hello 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.
August 30, 2015 at 11:58 am #373619Here 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?
August 30, 2015 at 12:02 pm #373624Hi @iceman600,
You just need to copy the
_header.php
file to theglobal
directory.In the same path of X parent theme:
– x/framework/views/global/_header.php
– x-child/framework/views/global/_header.phpRegards!
August 30, 2015 at 12:39 pm #373651Thank you so mch you rock for replying so fast 🙂
August 30, 2015 at 12:41 pm #373653You’re most welcome 🙂
November 3, 2015 at 9:36 pm #651622Are 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?
November 3, 2015 at 11:45 pm #651726Hi @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!
January 23, 2016 at 2:53 am #760196Hi, 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-DocumentationI’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
January 23, 2016 at 11:19 am #760551Please 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 🙂
January 24, 2016 at 2:23 pm #761852Hi, 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
-
AuthorPosts