Add user account links next to cart icon

Support Forums for LiveMesh Themes & Plugins Forums Extinct Theme Support Add user account links next to cart icon

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #8486
    frephraim
    Member

    I need to add links to the left of the WooCommerce cart icon to either login/register, or link to the user’s account if already logged in. Here’s a PHP snippet that might work, but I don’t know where to include the code.

    <?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 } ?>
    #8495
    Raghavendra
    Moderator

    You can try inserting the same into header.php file where the menu , logo are being shown. That would be the easiest way to go about it.

    #8503
    frephraim
    Member

    OK, that worked as far as getting it into the header, but it just appears in a random place and is not styled at all, or anything…

    #8523
    Raghavendra
    Moderator

    If you post the link as a private message here, I can suggest some custom CSS styling to make that look better.

    #8641
    frephraim
    Member

    Well, I actually decided to put it somewhere else on the site, but here’s a related problem: on screens with a mobile menu, the cart button pushes the menu box down so that it covers the site logo:

    http://snag.gy/SIf1l.jpg

    Also, the site logo does not resize responsively on Internet Explorer as it does on Chrome/Safari.

    #8676
    Veena
    Moderator

    Pls give the link of your site as a private message so that i can suggest the required changes.

Viewing 6 posts - 1 through 6 (of 6 total)
  • The forum ‘Extinct Theme Support’ is closed to new topics and replies.