Hello @nvlctur
Go to function.php of child theme and add following function
if ( !function_exists( 'chld_thm_cfg_parent_css' ) ):
function real_estater_child_custom_logo() {
$custom_logo_id = get_theme_mod( 'custom_logo' );
$html = sprintf( '<a href="%1$s" class="custom-logo-link" rel="home" itemprop="url">%2$s</a>',
esc_url( 'www.google.com' ),
wp_get_attachment_image( $custom_logo_id, 'full', false, array(
'class' => 'custom-logo',
) )
);
return $html;
}
endif;
add_filter( 'get_custom_logo', 'real_estater_child_custom_logo' );
Replace http://www.google.com with the required URL of your page.
To create a child theme you can use Child Theme Generator Plugin or go through the handbook https://developer.ww.wp.xz.cn/themes/advanced-topics/child-themes/
Thanks
Hi thanks
I tried applying it like this:
if ( !function_exists( 'chld_thm_cfg_parent_css' ) ):
function real_estater_child_custom_logo() {
$custom_logo_id = get_theme_mod( 'custom_logo' );
$html = sprintf( '%2$s',
esc_url( 'www.autoglaze.co.za/services' ),
wp_get_attachment_image( $custom_logo_id, 'full', false, array(
'class' => 'custom-logo',
) )
);
return $html;
}
endif;
add_filter( 'get_custom_logo', 'real_estater_child_custom_logo' );
It doesnt work, gives me this error: https://drive.google.com/file/d/15tGe-dTl-xhor57L6rzm7zfFfWZRr1j3/view?usp=sharing
Hello @nvlctur
You can try with this code
if ( !function_exists( 'real_estater_child_custom_logo' ) ):
function real_estater_child_custom_logo() {
$custom_logo_id = get_theme_mod( 'custom_logo' );
$html = sprintf( '<a href="%1$s" class="custom-logo-link" rel="home" itemprop="url">%2$s</a>',
esc_url( 'www.google.com' ),
wp_get_attachment_image( $custom_logo_id, 'full', false, array(
'class' => 'custom-logo',
) )
);
return $html;
}
endif;
add_filter( 'get_custom_logo', 'real_estater_child_custom_logo' );
The code previously not copied exactly. I can see there is empty space https://prnt.sc/ui0zom making some issue.
So, please try with the above and if not fixed, then contact us through email.
Thanks
Hi there
Thanks so much, applied this new code and it works perfectly – client is super happy.