Created
February 3, 2012 12:47
-
-
Save jameskoster/1730015 to your computer and use it in GitHub Desktop.
WooCommerce - My Account link
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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 } ?> |
hello how to display user logged in place my account
Hello, I have a question. This code is it implemented in template/header.php or header.php of the theme in use?
Hi jameskoster,
May I know where to find header.php file.
It would be more useful if you can explain this code to us. Actually I can see "wootheme" there in code, and I am using avada theme. So will it work on avada 4.0.3
Does this still work?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This snippet works great for me! I would also love a log out option for users who are logged in. What is the code for that and where would it go?