Viewing 4 posts - 1 through 4 (of 4 total)
  • Posted in: Dante
  • #116471
    wochurch
    Member
    Post count: 55

    I’d like to change the link of the main logo on the homepage, as I’m using this page as a subpage of the main site. I saw a solution in another post, but the folder structure doesn’t seem to be the same.

    #116567
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Please insert given below code snippet at functions.php of child theme. You need to insert your url in this code. I have commented the line of code to insert the url.

    function sf_logo($logo_class) {
    			
    			//VARIABLES
    			global $woocommerce;
    			$options = get_option('sf_dante_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 ($retina_logo == "") {
    			$retina_logo = $logo;
    			}
    			$logo_output = "";		
    			$logo_alt = get_bloginfo( 'name' );
    			$logo_link_url = 'http://www.example.com';//Please insert your url
    			
    			
    			// LOGO OUTPUT
    			$logo_output .= '<div id="logo" class="'.$logo_class.' clearfix">'. "\n";
    			$logo_output .= '<a href="'.$logo_link_url.'">'. "\n";
    			if ($logo != "") { 
    			$logo_output .= '<img class="standard" src="'.$logo.'" alt="'.$logo_alt.'" />'. "\n";
    			} else {
    			$logo_output .= '<h1 class="standard">'.$logo_alt.'</h1>'. "\n";
    			}
    			if ($retina_logo != "") {
    			$logo_output .= '<img class="retina" src="'.$retina_logo.'" alt="'.$logo_alt.'" />'. "\n";
    			} else {
    			$logo_output .= '<h1 class="retina">'.$logo_alt.'</h1>'. "\n";
    			}
    			$logo_output .= '</a>'. "\n";
    			$logo_output .= '<a href="#" class="visible-sm visible-xs mobile-menu-show"><i class="ss-rows"></i></a>'. "\n";
    			if ($show_cart && $woocommerce != "") {
    			$logo_output .= '<a href="'.$woocommerce->cart->get_cart_url().'" class="visible-sm visible-xs mobile-cart-link"><i class="ss-cart"></i></a>'. "\n";
    			}
    			$logo_output .= '</div>'. "\n";
    			
    			
    			// LOGO RETURN		
    			return $logo_output;
    		}

    Thanks
    Mohammad

    #116737
    wochurch
    Member
    Post count: 55

    Worked perfectly Mohammad. Thank you sir.

    For anyone else looking at this thread:

    1. If you don’t already have a functions.php file in wp-content/themes/dante-child, copy wp-content/themes/dante/functions.php and paste it inside wp-content/themes/dante-child/
    2. Open that file you just pasted and remove everything inside the <?php ?> tags
    3. Paste the above code inside those tags and replace the commented URL with your own

    #116739
    Kyle – SUPPORT
    Moderator
    Post count: 35880

    Great, thanks 🙂

    – Kyle

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