Home Forums Basel support forum Changing "My Account" / "Login Register" Menu

Changing "My Account" / "Login Register" Menu

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #648

    hazard161
    Participant

    Hey again,

    How do I edit the menu to the left of the wishlist, search, and cart icons.

    Thanks!

    #650

    Artem Temos
    Keymaster

    Hello,

    Place the following code into your functions.php inside the child theme to edit this small navigation next to logo

    
    function basel_get_header_links() {
    	$links = array();
    
    	if( ! basel_woocommerce_installed() ) return $links;
    
    	$account_link = get_permalink( get_option('woocommerce_myaccount_page_id') );
    
    	if( basel_get_opt( 'login_links' ) ) {
    		if( is_user_logged_in() ) {
    			$links[] = array(
    				'label' => esc_html__('My Account', 'basel'),
    				'url' => $account_link
    			);
    		} else {
    			$links[] = array(
    				'label' => esc_html__('Login / Register', 'basel'),
    				'url' => $account_link
    			);
    		}
    	}
    
    	$links[] = array(
    		'label' => esc_html__('Custom link', 'basel'),
    		'url' => '#test'
    	);
    
    	return apply_filters( 'basel_get_header_links',  $links );
    }
    
Viewing 2 posts - 1 through 2 (of 2 total)

The topic ‘Changing "My Account" / "Login Register" Menu’ is closed to new replies.