New Landing How can we help? Themeforest Theme Support Neighborhood Login/ register button name

Viewing 4 posts - 1 through 4 (of 4 total)
  • #79414
    LouisaMel
    Member
    Post count: 46

    Hi there!

    I would like to change the name of the “login” button to “login/register” on the main header (as it was beofre if I remember well).

    Do you have any solution for that please?

    Thanks!

    #79580
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Please put this code functions.php of child theme :

    function sf_aux_links($position, $alt_version = FALSE) {
    		
    			// VARIABLES
    			$login_url = wp_login_url();
    			$logout_url = wp_logout_url( home_url() );
    			$myaccount_page_id = get_option( 'woocommerce_myaccount_page_id' );
    			if ( $myaccount_page_id ) {
    				$logout_url = wp_logout_url( get_permalink( $myaccount_page_id ) );
    			  	$login_url = get_permalink( $myaccount_page_id );
    			  	if ( get_option( 'woocommerce_force_ssl_checkout' ) == 'yes' ) {
    			    	$logout_url = str_replace( 'http:', 'https:', $logout_url );
    					$login_url = str_replace( 'http:', 'https:', $login_url );
    				}
    			}
    			$options = get_option('sf_neighborhood_options');
    			$show_sub = $options['show_sub'];
    			$show_translation = $options['show_translation'];
    			$sub_code = $options['sub_code'];
    			$show_account = $options['show_account'];
    			$tb_search_text = $options['tb_search_text'];
    			$aux_links_output = $ss_enable = "";
    			
    			if (isset($options['ss_enable'])) {
    				$ss_enable = $options['ss_enable'];
    			} else {
    				$ss_enable = true;
    			}
    			
    			// LINKS + SEARCH OUTPUT
    			$aux_links_output .= '<nav class="'.$position.'">'. "\n";
    			$aux_links_output .= '<ul class="menu">'. "\n";
    			if ($show_sub) {
    				$aux_links_output .= '<li class="parent"><a href="#">'. __("Subscribe", "swiftframework") .'</a>'. "\n";
    				$aux_links_output .= '<ul class="sub-menu">'. "\n";
    				$aux_links_output .= '<li><div id="header-subscribe" class="clearfix">'. "\n";
    				$aux_links_output .= $sub_code . "\n";
    				$aux_links_output .= '</div></li>'. "\n";
    				$aux_links_output .= '</ul>'. "\n";
    				$aux_links_output .= '</li>'. "\n";
    			}
    			if ($show_translation) {
    				$aux_links_output .= '<li class="parent aux-languages"><a href="#">'. __("Language", "swiftframework") .'</a>'. "\n";
    				$aux_links_output .= '<ul id="header-languages" class="sub-menu">'. "\n";
    				if (function_exists( 'language_flags' )) {
    				$aux_links_output .= language_flags();
    				}
    				$aux_links_output .= '</ul>'. "\n";
    				$aux_links_output .= '</li>'. "\n";
    			}
    			if ($show_account) {
    				if (is_user_logged_in()) {
    					$aux_links_output .= '<li><a href="'.wp_logout_url(home_url()).'">'. __("Sign Out", "swiftframework") .'</a></li>'. "\n";
    					if ( $myaccount_page_id ) {
    					$aux_links_output .= '<li><a href="'.get_permalink( $myaccount_page_id ).'" class="admin-link">'. __("My Account", "swiftframework") .'</a>'. "\n";
    					} else {
    					$aux_links_output .= '<li><a href="'.get_admin_url().'" class="admin-link">'. __("My Account", "swiftframework") .'</a>'. "\n";
    					}
    				} else {
    					$aux_links_output .= '<li><a href="'.$login_url.'">'. __("Login/Register", "swiftframework") .'</a>'. "\n";			
    				}
    			}
    			if (($position == "header-menu" && !$alt_version) && $ss_enable) {
    			$aux_links_output .= '<li><a class="swift-search-link" href="#"><i class="fa-search-plus"></i><span>'.do_shortcode($tb_search_text).'</span></a></li>'. "\n";		
    			}
    			$aux_links_output .= '</ul>'. "\n";
    			$aux_links_output .= '</nav>'. "\n";
    		
    		
    			// RETURN
    			return $aux_links_output;
    		
    		}

    Hope that will help you sure.
    Thanks ๐Ÿ™‚
    With Best Regards
    Swift Ideas

    #79730
    LouisaMel
    Member
    Post count: 46

    Hi!

    I will try it.

    Thanks a lot! ๐Ÿ™‚

    #79732
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Its ok.
    Thanks ๐Ÿ™‚
    With Best Regards
    Swift Ideas

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in and have valid license to reply to this topic.

License required for one of the following items
Login and Registration Log in · Register