Changing Footer
-
Hi,
My Site title is different from my site url (domain name) and I’d like to use the url in my Footer ie © ‘www.myurl.com’
I’m using a child theme with Customizr and in functions.php of the child theme I’ve got the code snippet from here
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' ) ).' <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>'; }Thanks
Viewing 7 replies - 1 through 7 (of 7 total)
-
What is the issue you are having? You are on the right direction.
The problem is my Footer says ©’site-title’
and I want it to say ©’site url’
Please post your site url
Try this
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' ) ).' <a href="'.esc_url( home_url() ).'" title="'.esc_url( home_url() ).'" rel="bookmark">'.esc_url( home_url() ).'</a> · '.($credits ? $credits : 'Designed by <a href="http://www.presscustomizr.com/">Press Customizr</a>').' ·'.($newline_credits ? '<br />· '.$newline_credits.' ·' : '').'</p> </div>'; }Thanks very much!
That did the trick.
Except the url in the Footer is in format http://’sitename.com’
How to change it to just © ‘www.sitename.com’ ?
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' ) ).' <a href="'.esc_url( home_url() ).'" title="'.esc_url( home_url() ).'" rel="bookmark">'.str_replace('http://','www.',esc_url( home_url() )).'</a> · '.($credits ? $credits : 'Designed by <a href="http://www.presscustomizr.com/">Press Customizr</a>').' ·'.($newline_credits ? '<br />· '.$newline_credits.' ·' : '').'</p> </div>'; }Perfect!
Many thankyous 🙂
Viewing 7 replies - 1 through 7 (of 7 total)
The topic ‘Changing Footer’ is closed to new replies.
