-
-
Save renventura/d7e2892e95d4421188252f737093ff20 to your computer and use it in GitHub Desktop.
<?php //* Mind this opening PHP tag | |
// Remove the logout link in comment form | |
add_filter( 'comment_form_logged_in', '__return_empty_string' ); |
I also need from my account page. I would also love to receive.
Unfortunately, there's no filter for this in the WooCommerce My Account page. You'd need to override the /woocommerce/templates/auth/form-grant-access.php
file and remove it from there. https://docs.woocommerce.com/document/template-structure/
Hi . Is this about deleting an entire file? Need to delete the entire file?
It's overriding a template file. I'd recommend getting in touch with a developer if unsure about this. Errors could cause your page to crash.
indeed. I'm not a programmer.
Hello,
You need to put this in your functions.php
This method catch the login field and remove it from the form !
add_filter( 'comment_form_logged_in', 'unset_login_field' );
function unset_login_field($fields){
unset($fields);
return $fields;
}
Hello,
You need to put this in your functions.php This method catch the login field and remove it from the form !
add_filter( 'comment_form_logged_in', 'unset_login_field' ); function unset_login_field($fields){ unset($fields); return $fields; }
this solved my problem thank you :D
Can you please share how to remove this same text and link from the My Account page of WooCommerce?
Thank you!