Archived topic
Login/Register Icon
4 replies · Started by Ash on May 26, 2020
Hi
I'm using the following hook for login/register, as it switches to account once logged in.
<?php if ( is_user_logged_in() ) { ?>
<a href="<?php echo get_permalink( get_option('woocommerce_myaccount_page_id') ); ?>" title="<?php _e('My Account','woothemes'); ?>"><?php _e('My Account','woothemes'); ?></a>
<?php }
else { ?>
<a href="<?php echo get_permalink( get_option('woocommerce_myaccount_page_id') ); ?>" title="<?php _e('Login / Register','woothemes'); ?>"><?php _e('Login | Register','woothemes'); ?></a>
<?php } ?>
I would like to add the fa-user icon to the left, how to add this?
Thanks
Hi there,
you can include the FA Icon HTML in your code eg. this line:
<a href="<?php echo get_permalink( get_option('woocommerce_myaccount_page_id') ); ?>" title="<?php _e('My Account','woothemes'); ?>"><?php _e('My Account','woothemes'); ?></a>
Could be come:
<a href="<?php echo get_permalink( get_option('woocommerce_myaccount_page_id') ); ?>" title="<?php _e('My Account','woothemes'); ?>"><i class="fas fa-user"></i><?php _e('My Account','woothemes'); ?></a>
Tried that can't get that to work shows a strange tick/x symbol
Sorted it should be "fa fa-user" not "fas fa-user"
Glad to hear that