Register button beside login
-
Woocommerce has a registration option to display on the login option in the My Account page. You could edit the header.php file in the accesspress-store theme file structure from this:
<div class=”login-woocommerce”>
<?php
if (is_user_logged_in()) {
global $current_user;
get_currentuserinfo();
?>” class=”logout”>
<?php _e(‘ LogOut’, ‘accesspress-store’); ?>
<?php
} else {
?>
” class=”account”>
<?php _e(‘LogIn’, ‘accesspress-store’); ?>
<?php }
?>
</div>to this:
<div class=”login-woocommerce”>
<?php
if (is_user_logged_in()) {
global $current_user;
get_currentuserinfo();
?>” class=”logout”>
<?php _e(‘ LogOut’, ‘accesspress-store’); ?>
<?php
} else {
?>
” class=”account”>
<?php _e(‘LogIn/Register’, ‘accesspress-store’); ?>
<?php }
?>
</div>to display LogIn/Register in the option. I would recommend creating a child theme so when you update the theme you wont lose this feature. Hope this helps.
Woocommerce has a registration option to display on the login option in the My Account page. You could edit the header.php file in the accesspress-store theme file structure from this:
<div class="login-woocommerce"> <?php if (is_user_logged_in()) { global $current_user; get_currentuserinfo(); ?> <a href="<?php echo wp_logout_url( home_url() ); ?>" class="logout"> <?php _e(' LogOut', 'accesspress-store'); ?> </a> <?php } else { ?> <a href="<?php echo get_permalink(get_option('woocommerce_myaccount_page_id')); ?>" class="account"> <?php _e('LogIn', 'accesspress-store'); ?> </a> <?php } ?> </div>to this:
<div class="login-woocommerce"> <?php if (is_user_logged_in()) { global $current_user; get_currentuserinfo(); ?> <a href="<?php echo wp_logout_url( home_url() ); ?>" class="logout"> <?php _e(' LogOut', 'accesspress-store'); ?> </a> <?php } else { ?> <a href="<?php echo get_permalink(get_option('woocommerce_myaccount_page_id')); ?>" class="account"> <?php _e('LogIn/Register', 'accesspress-store'); ?> </a> <?php } ?> </div>to display LogIn/Register in the option. I would recommend creating a child theme so when you update the theme you wont lose this feature. Hope this helps.
Sorry, didnt put the code tags in the previous reply.
The topic ‘Register button beside login’ is closed to new replies.
