Viewing 12 posts - 1 through 12 (of 12 total)
  • #111491
    rileyiwilliams
    Member
    Post count: 39

    Hi,

    I’m trying to add a long/wide image to the header, where the main logo is. What happens is that the image gets squashed down to a 370px maximum, but I want it to be full (in this case 843px). If you have a look at it you’ll notice that the image consists of a blue rectangle, which is the logo, and then a few animals running towards it. Just as a thought, maybe the way to go is break the image up into the blue rectangle and enter that as the logo, then somehow insert the second part (the animals) next to it, floating past the extent of the div. I don’t know, just trying to be helpful.

    Also, I did search but couldn’t find a solution that works, one of the suggestions was the following:

    #header-section #logo {
    width: 40%;
    }
    #header-section .header-right {
    width: 54%;
    }

    Which didn’t help.

    Ideas?

    #111498
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Please insert this code at functions.php of child theme.

    function sf_header() {
    	
    		// VARIABLES
    		$options = get_option('sf_neighborhood_options');
    		$header_layout = $options['header_layout'];
    		$show_cart = $options['show_cart'];
    		$show_wishlist = $options['show_wishlist'];
    		$disable_search = false;
    		if (isset($options['disable_search'])) {
    			$disable_search = $options['disable_search'];
    		}
    		$header_output = $main_menu = '';
    				
    		if ($header_layout == "header-1") {
    		
    		$header_output .= '<header id="header" class="clearfix">'. "\n";
    		$header_output .= '<div class="container">'. "\n";
    		$header_output .= '<div class="row">'. "\n";
    		$header_output .= '<div class="header-left span4">'.sf_woo_links('header-menu', 'logo-left').'</div>'. "\n";
    		$header_output .= sf_logo('span4 logo-center');
    		$header_output .= '<div class="header-right span4">'.sf_aux_links('header-menu', TRUE).'</div>'. "\n";
    		$header_output .= '</div> <!-- CLOSE .row -->'. "\n";
    		$header_output .= '</div> <!-- CLOSE .container -->'. "\n";
    		$header_output .= '</header>'. "\n";
    		$header_output .= sf_mobile_search();
    		$header_output .= '<div id="main-nav">'. "\n";
    		$header_output .= sf_main_menu('main-navigation', 'full');
    		$header_output .= '</div>'. "\n";
    		
    		} else if ($header_layout == "header-2") {
    		
    		$header_output .= '<header id="header" class="clearfix">'. "\n";
    		$header_output .= '<div class="container">'. "\n";
    		$header_output .= '<div class="row">'. "\n";
    		$header_output .= sf_logo('span10 logo-left');
    		$header_output .= '<div class="header-right span2">'.sf_aux_links('header-menu').'</div>'. "\n";
    		$header_output .= '</div> <!-- CLOSE .row -->'. "\n";
    		$header_output .= '</div> <!-- CLOSE .container -->'. "\n";
    		$header_output .= '</header>'. "\n";
    		$header_output .= sf_mobile_search();
    		$header_output .= '<div id="main-nav">'. "\n";
    		$header_output .= sf_main_menu('main-navigation', 'full');
    		$header_output .= '</div>'. "\n";
    		
    		} else if ($header_layout == "header-3") {
    		
    		$header_output .= '<header id="header" class="clearfix">'. "\n";
    		$header_output .= '<div class="container">'. "\n";
    		$header_output .= '<div class="row">'. "\n";
    		$header_output .= '<div class="header-left span8">'.sf_aux_links('header-menu').'</div>'. "\n";
    		$header_output .= sf_logo('span4 logo-right');
    		$header_output .= '</div> <!-- CLOSE .row -->'. "\n";
    		$header_output .= '</div> <!-- CLOSE .container -->'. "\n";
    		$header_output .= '</header>'. "\n";
    		$header_output .= sf_mobile_search();
    		$header_output .= '<div id="main-nav">'. "\n";
    		$header_output .= sf_main_menu('main-navigation', 'full');
    		$header_output .= '</div>'. "\n";
    		
    		} else if ($header_layout == "header-4") {
    		
    		$header_output .= '<header id="header" class="clearfix">'. "\n";
    		$header_output .= '<div class="container">'. "\n";
    		$header_output .= '<div class="row">'. "\n";
    		$header_output .= sf_logo('span4 logo-left');
    		$header_output .= '<div class="header-right span8">';
    		$header_output .= '<nav>'. "\n";
    		$header_output .= '<ul class="menu">'. "\n";
    		if ($show_cart) {
    		$header_output .= sf_get_cart();
    		}
    		if ( class_exists( 'YITH_WCWL_UI' ) &&  $show_wishlist)  {
    		$header_output .= sf_get_wishlist();
    		}
    		if (!$disable_search) {
    		$header_output .= '<li class="menu-search no-hover"><a href="#"><i class="fa-search"></i></a>'. "\n";
    		$header_output .= '<ul class="sub-menu">'. "\n";
    		$header_output .= '<li><div class="ajax-search-wrap"><div class="ajax-loading"></div><form method="get" class="ajax-search-form" action="'.home_url().'/"><input type="text" placeholder="'.__("Search", "swiftframework").'" name="s" autocomplete="off" /></form><div class="ajax-search-results"></div></div></li>'. "\n";			
    		$header_output .= '</ul>'. "\n";
    		$header_output .= '</li>'. "\n";
    		}
    		$header_output .= '</ul>'. "\n";
    		$header_output .= '</nav>'. "\n";
    		$header_output .= sf_main_menu('main-navigation');
    		$header_output .= '</div>'. "\n";
    		$header_output .= '</div> <!-- CLOSE .row -->'. "\n";
    		$header_output .= '</div> <!-- CLOSE .container -->'. "\n";
    		$header_output .= '</header>'. "\n";
    		$header_output .= sf_mobile_search();
    		
    		} else {
    		
    		$header_output .= '<header id="header" class="clearfix">'. "\n";
    		$header_output .= '<div class="container">'. "\n";
    		$header_output .= '<div class="row">'. "\n";
    		$header_output .= sf_logo('span4 logo-right');
    		$header_output .= '<div class="header-left span8">';
    		$header_output .= sf_main_menu('main-navigation');
    		$header_output .= '<nav>'. "\n";
    		$header_output .= '<ul class="menu">'. "\n";
    		if ($show_cart) {
    		$header_output .= sf_get_cart();
    		}
    		if ( class_exists( 'YITH_WCWL_UI' ) &&  $show_wishlist)  {
    		$header_output .= sf_get_wishlist();
    		}
    		if (!$disable_search) {
    		$header_output .= '<li class="menu-search no-hover"><a href="#"><i class="fa-search"></i></a>'. "\n";
    		$header_output .= '<ul class="sub-menu">'. "\n";
    		$header_output .= '<li><div class="ajax-search-wrap"><div class="ajax-loading"></div><form method="get" class="ajax-search-form" action="'.home_url().'/"><input type="text" placeholder="'.__("Search", "swiftframework").'" name="s" autocomplete="off" /></form><div class="ajax-search-results"></div></div></li>'. "\n";			
    		$header_output .= '</ul>'. "\n";
    		$header_output .= '</li>'. "\n";
    		}
    		$header_output .= '</ul>'. "\n";
    		$header_output .= '</nav>'. "\n";
    		$header_output .= '</div>'. "\n";
    		$header_output .= '</div> <!-- CLOSE .row -->'. "\n";
    		$header_output .= '</div> <!-- CLOSE .container -->'. "\n";
    		$header_output .= '</header>'. "\n";
    		$header_output .= sf_mobile_search();
    		
    		}
    		
    		// HEADER RETURN
    		return $header_output;
    		
    	}

    Thanks ๐Ÿ™‚
    With Best Regards
    Mohammad

    #111536
    rileyiwilliams
    Member
    Post count: 39

    Thanks for that Mohammad, but either it doesn’t work or I’ve put it in the wrong place.

    There wasn’t a functions.php file in the child theme, so I created one (just a blank file) then pasted that code into it. Now that code comes up everywhere instead of doing php stuff.

    Am I meant to put it somewhere else?

    It says:
    Warning: Cannot modify header information – headers already sent by (output started at /home11/anywher1/public_html/www.hereboy.com.au/wp-content/themes/neighborhood-child/functions.php:127) in /home11/anywher1/public_html/www.hereboy.com.au/wp-content/plugins/yith-woocommerce-wishlist/functions.yith-wcwl.php on line 118

    Thanks

    #111552
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Please try to insert code between php tags.
    Example-:

    <?php
    //YOUR CODE
    ?>

    Thanks ๐Ÿ™‚
    With Best Regards
    Mohammad

    #111556
    rileyiwilliams
    Member
    Post count: 39

    I tried that just now, but it broke wordpress. I went in through ftp to undo.

    I sent the login details in the first post if you need them.

    Thanks!

    #111564
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    Now i need your FTP login detail.
    Thanks ๐Ÿ™‚
    With Best Regards
    Mohammad

    #111569
    rileyiwilliams
    Member
    Post count: 39
    This reply has been marked as private.
    #111679
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    I have resolved the issue so please check it now.
    Thanks ๐Ÿ™‚
    With Best Regards
    Mohammad

    #111684
    rileyiwilliams
    Member
    Post count: 39

    That’s excellent! Thank you very much Mohammad! Was there any other file changed, or just the functions.php in child theme?

    #111686
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    I made changes only at function.php of child theme. I’m glad that issue resolved.
    Thanks ๐Ÿ™‚
    With Best Regards
    Mohammad

    #111703
    rileyiwilliams
    Member
    Post count: 39

    Ok, and thanks again! It’s support like this that’ll have me buying again in the future!

    #111711
    Kyle – SUPPORT
    Moderator
    Post count: 35880

    No problem ๐Ÿ™‚ Good work Mohammad

    – Kyle

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