Menaka S. on "[Theme: Customizr] 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 = '';
retu '
<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

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 = '';
retu '
<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' ?

Menaka S.
Member
Posted 3 minutes ago #

add_filter('tc_credits_display', 'my_custom_credits', 20);
function my_custom_credits(){
$credits = '';
$newline_credits = '';
retu '
<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>';
}

WordPress ...
ما را در سایت WordPress دنبال می کنید

برچسب : نویسنده : استخدام کار wpss بازدید : 218 تاريخ : پنجشنبه 20 خرداد 1395 ساعت: 11:37