好了,现在该把你的手弄脏了。打开你的功能。php文件位于wp content/themes/your theme name/中,并在其中添加以下代码:
/**
* Print the customer avatar in My Account page, after the welcome message
*/
function storefront_myaccount_customer_avatar() {
$current_user = wp_get_current_user();
echo \'<div class="myaccount_avatar">\' . get_avatar( $current_user->user_email, 72, \'\', $current_user->display_name ) . \'</div>\';
}
add_action( \'woocommerce_account_content\', \'storefront_myaccount_customer_avatar\', 5 );
然后打开你的风格。css文件,并添加以下代码:
.myaccount_avatar {
border-right: 1px solid rgba(0, 0, 0, 0.1);
float: left;
padding-right: 10px;
margin-right: 10px;
width: 83px;
}