New Landing How can we help? Themeforest Theme Support Neighborhood Adding function to sf-header.php but not displaying in correct location

Viewing 3 posts - 1 through 3 (of 3 total)
  • #28201
    hardigi
    Member
    Post count: 1

    Hi
    I’m trying to add the woocommerce predictive search plugin function to the head of the site.
    I’m adding the following code to sf-header.php file woo_predictive_search_widget()

    So output is…

    } 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('span3 logo-left');
    		$header_output .= '<div class="span5">'.woo_predictive_search_widget().'</div>'. "\n";
    		$header_output .= '<div class="header-right span4">'.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";

    However when the code outputs on the page the search widget code appears above <header id="header" class="clearfix">

    And where you would expect it to output (between <div class="span5"> and </div>) is blank!

    Any ideas why this might be happening?

    Thanks!

    #28209
    hardigi
    Member
    Post count: 1

    IGNORE! This was a plugin issue that was echoing rather than returning!

    #28478
    Melanie – SUPPORT
    Member
    Post count: 11032

    Great!

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