Altering/adding footer credits
-
I downloaded Childtheme from Customizr, uploaded it in WordPress and activated it. After that I opend function.php from the Childtheme and paste the copied snippet as described in http://presscustomizr.com/snippet/altering-adding-footer-credits/
Than I changed line 3 as follows, but nothing changed in the footer. What do I wrong?:<?php
/**
add_filter(‘tc_credits_display’, ‘my_custom_credits’, 20);
function my_custom_credits(){
$credits = ‘Developed by kc‘;
$newline_credits = ”;
return ‘
<div class=”span6 credits”>
<p> · © ‘.esc_attr( date( ‘Y’ ) ).’ ‘.esc_attr(get_bloginfo()).’ · ‘.($credits ? $credits : ‘Designed by Press Customizr‘).’ ·’.($newline_credits ? ‘
· ‘.$newline_credits.’ ·’ : ”).'</p> </div>’;
}
*/
-
Try removing
<?php /**
and
*/
Link to site would help diagnose
I removed
<?php
/**and
*/but this doesn’t seem to help.
I just don’t know what I do wrong in the snippet…Link to site?
I can’t because site is in progress. Which code do you want to see, i can sent it?
I can give you now a link to the site
Hope you can help me,best regards
It’s a very old snippet. Did you find the Comment that says:
Andrei Duncan • 2 years ago
if you do not put anything inside $credits and $newline_credits the original footer is being used. If you want them removed, you need to put inside $credits, like this:
$credits = ‘ ‘;The   is being suppressed in the Forum, please refer to the original Comment at the bottom.
Yes I found that Comment from Andrei Duncan, but when i filled it like its comment: nothing changed in the footer…
I changed the functions in the like Andrei said:
<?php
/**
add_filter(‘tc_credits_display’, ‘my_custom_credits’, 20);
function my_custom_credits(){
$credits = ‘ ‘;
$newline_credits = ‘ ‘;
return ‘
<div class=”span6 credits”>
<p> · © ‘.esc_attr( date( ‘Y’ ) ).’ ‘.esc_attr(get_bloginfo()).’ · ‘.($credits ? $credits : ‘Designed by Press customizr‘).’ ·’.($newline_credits ? ‘
· ‘.$newline_credits.’ ·’ : ”).'</p> </div>’;remove_action (‘__after_header’ , array( TC_slider::$instance , ‘tc_slider_display’ ));
remove_action ( ‘__before_main_container’ , array( TC_featured_pages::$instance , ‘tc_fp_block_display’), 10 );add_action (‘__before_main_container’ , array( TC_slider::$instance , ‘tc_slider_display’ ), 10);
add_action ( ‘__after_header’ , array( TC_featured_pages::$instance , ‘tc_fp_block_display’));
}
*/By the way: also de slider snippet doesn’t either work…
I really filled in the function.php above but copy paste shows empty. This is what i filled in:
$credits = ‘ ‘;
$newline_credits = ‘ ‘;Hi @rodbol,
I have my code like this:
<?php add_filter('tc_credits_display', 'my_custom_credits'); function my_custom_credits(){ $credits = 'Alle rechten voorbehouden. Customiz´d bij jouw-naam'; $newline_credits = ''; return ' <div class="span6 credits"> <p> · © '.esc_attr( date( 'Y' ) ).' <a href="'.esc_url( home_url() ).'" title="'.esc_attr(get_bloginfo()).'" rel="bookmark">'.esc_attr(get_bloginfo()).'</a> · '.($credits ? $credits : 'Designed by <a href="http://www.presscustomizr.com/">Press Customizr</a>').' ·'.($newline_credits ? '<br />· '.$newline_credits.' ·' : '').'</p> </div>'; }
The only part that you need to change is jouw-naam.
hope it helps..
Cheers!
YES!! Thank you very much wph4!! It works with help of your code,
cheers!
Glad it helped you!
a.u.b.
- The topic ‘Altering/adding footer credits’ is closed to new replies.