New Landing How can we help? Themeforest Theme Support Neighborhood Change header logo link

Viewing 8 posts - 1 through 8 (of 8 total)
  • #157836
    fixers
    Member
    Post count: 253

    Hi There
    Is there a way to change the link from the logo in my header please?

    I have seen a previous thread mentioning changing header.pho files, no way to do this using theme function php?

    If it can only be done by editing the header files, what structure is best to do this within the child theme?

    #157861
    Kyle – SUPPORT
    Moderator
    Post count: 35880

    Hi

    Add this to your child theme’s functions.php file:

    /* LOGO
    	================================================== */
    	if (!function_exists('sf_logo')) {
    	function sf_logo($logo_class) {
    
    		//VARIABLES
    		global $woocommerce;
    		$options = get_option('sf_neighborhood_options');
    		$show_cart = $options['show_cart'];
    		$logo = $retina_logo = "";
    		if (isset($options['logo_upload'])) {
    		$logo = $options['logo_upload'];
    		}
    		if (isset($options['retina_logo_upload'])) {
    		$retina_logo = $options['retina_logo_upload'];
    		}
    		if ($logo == "") {
    		$logo = get_template_directory_uri() . '/images/logo.png';
    		}
    
    		if ($retina_logo == "") {
    		$retina_logo = $logo;
    		}
    		$logo_output = "";
    		$logo_alt = get_bloginfo( 'name' );
    		$logo_link_url = home_url();
    		$disable_search = false;
    		if (isset($options['disable_search'])) {
    			$disable_search = $options['disable_search'];
    		}
    
    		$logos = array('logo', 'retina_logo');
    		foreach ($logos as $this_logo) {
    			if (stripos(${$this_logo}, 'http://') === 0) {
    				${$this_logo} = substr(${$this_logo}, 5);
    			}
    		}
    
    		// LOGO OUTPUT
    		$logo_output .= '<div id="logo" class="'.$logo_class.' clearfix">'. "\n";
    		$logo_output .= '<a class="logo-link" href="'.$logo_link_url.'">'. "\n";
    		$logo_output .= '<img class="standard" src="'.$logo.'" alt="'.$logo_alt.'" />'. "\n";
    		$logo_output .= '<img class="retina" src="'.$retina_logo.'" alt="'.$logo_alt.'" />'. "\n";
    		$logo_output .= '</a>'. "\n";
    		$logo_output .= '<a href="#" class="hidden-desktop show-main-nav"><i class="fa-align-justify"></i></a>'. "\n";
    		if ($woocommerce && $show_cart) {
    		$logo_output .= '<a href="'.$woocommerce->cart->get_cart_url().'" class="hidden-desktop mobile-cart-link"><i class="sf-cart"></i></a>'. "\n";
    		}
    		if (!$disable_search) {
    		$logo_output .= '<a href="#" class="hidden-desktop mobile-search-link"><i class="fa-search"></i></a>'. "\n";
    		}
    		$logo_output .= '</div>'. "\n";
    
    		// LOGO RETURN
    		return $logo_output;
    	}
    	}

    Find this line:

    $logo_link_url = home_url();

    and change to:

    $logo_link_url = your desired link

    – Kyle

    #157924
    fixers
    Member
    Post count: 253

    Hi Kyle

    No that crashed the theme, any other ideas?

    #157981
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Its the only one idea to make your desire change. Please provide me wordpress admin login detail after installing WPIDE plugin.
    Thanks
    Mohammad

    #159195
    fixers
    Member
    Post count: 253
    This reply has been marked as private.
    #159227
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    I have made changes but your website redirected to http://localhost:8888/home/. So i am unable to view the website.
    Thanks
    Mohammad

    #159368
    fixers
    Member
    Post count: 253

    Thats worked, thanks how did you make the change please?

    Also did you explore why retina logo is displaying at FULL size of uploaded file not at 50%?

    #159369
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    I made changes as Kyle suggested you. I cant view your website so its not possible to check.
    Thanks
    Mohammad

Viewing 8 posts - 1 through 8 (of 8 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