[Resolved] Login/Register Icon

Home Forums Support Login/Register Icon

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #1301614
    Ash

    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

    #1301674
    David
    Staff
    Customer Support

    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>

    #1301696
    Ash

    Tried that can’t get that to work shows a strange tick/x symbol

    #1301697
    Ash

    Sorted it should be “fa fa-user” not “fas fa-user”

    #1301699
    David
    Staff
    Customer Support
Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.