Modifying the header-login.php file
Hello, how could I modify this file without having a problem when updating the template?
It is currently like this in header-login.php:
echo '<h4>'. sprintf( __( 'Hello %s,', 'woocommerce' ), esc_html( wp_get_current_user()->user_login ) ) .'</h4>';
I would like to show the client's name
echo '<h4>'. sprintf (__ ('Hello% s,', 'woocommerce'), esc_html (wp_get_current_user () -> name)). '</h4>';
Regards
Comments
Hello,
If you want to modify the theme files and keep your changes, you will have to use a child theme.
Please, visit the following link:
https://support.muffingroup.com/documentation/installation-updates/#child-theme
There you will find an explanation of how to set a child theme properly.
Thanks
hi, i'm currently occupying the theme child , i just copy and paste the modified file in the same path?
It would be great if you did functions something like this for example:
if (function_exists('header_login')) {
function header_login(){
}
}
so we can extend the function from the theme child and improve it without touching the parent theme .
regards
Thanks I solved it
Regards
I am glad that you solved it.
Please, let me know if I can help you with anything else.
Thanks