I found the instructions provided by Nicolas to add the code to the functions.php file of the theme.
Yes, it’s not clear. This should be in your child theme’s functions.php. See here; similar problem.
You need to:
- Restore the original functions.php for your Customizr version
- Set up a functions.php file in your child theme and
- Add your extras to the child theme’s functions.php.
Let us know what help you need with any of those steps.
Thread Starter
xondra
(@xondra)
I figured that I had to create a child theme after much reading. Thankfully I can speak English for all of this, or else I’d be lost 😛
This time around I added a tiny <?php at the beginning of my functions.php file for the child theme, and it worked. The developer is not very clear on this as probably he feels that his users already know that they have to put a beginning and an ending tag to all .php (well, this is mind numbing obvious now, but it wasn’t when I felt that it was a copy-paste thing). Yes, I did begin by modifying the original functions.php file, as you pointed out in his page.
GA says it’s installed and working. Thanks for all your help!
Cheers!
Xomdra
It is a free theme that is industrial-strength, though…
Thread Starter
xondra
(@xondra)
Sorry, I don’t understand our answer. I know it’s a very good theme.
Hi all,
I’m doing this in my child functions.php, but after putting the code in, website no longer works.
<?php
add_filter('tc_credits_display', 'my_custom_credits');
function my_custom_credits(){
$credits = ' ';
$newline_credits = ' ';
return '
<div class="span4 credits">
<p> · © '.esc_attr( date( 'Y' ) ).' <a href="'.esc_url( home_url() ).'" title="'.esc_attr(get_bloginfo()).'" rel="bookmark">'.esc_attr(get_bloginfo()).'</a> ·</p> </div>';
}
add_action('wp_head','my_analytics',1,20);
function my_analytics() {
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', '(MY TRACKING CODE HERE)', 'auto');
ga('send', 'pageview');
</script>
}
(Obviously have some additional code at the start to customize the footer)
What am I doing wrong?
THANKS IN ADVANCE