• Resolved myhero

    (@myhero)


    Hi,

    How can I replace the search that appears in the menu bar with my google search bar code?

    Thanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter myhero

    (@myhero)

    I’ve decided to replace the menu entirely with Ubermenu.
    I see that Ubermenu the easy integrate function does not work with this theme.

    I’m having some difficulty integrating my code manually in the header.php, what do I remove to get my ubermenu to work?

    Code I need to add: <?php ubermenu( ‘main-um’ ); ?>

    // Main menu
                            if( has_nav_menu( 'main' ) ) {
     				wp_nav_menu( array( 'container' => '', 'theme_location' => 'main', 'items_wrap' => '<ul class="menu-main mobile-menu superfish">%3$s</ul>' ) );
    			} else {
    				echo '<ul class="menu-main mobile-menu superfish"><li class="current_page_item"><a href="#">' . __( 'Add a menu', 'justwrite' )  . '</a></li><li><a href="#">' . __( 'Main Menu Location', 'justwrite' )  . '</a></li></ul>';
    			}
    		?>
    
            <a href="#" class="mobile-menu-button"><?php ac_icon( 'navicon' ) ?></a>
            <?php do_action( 'ac_action_main_menu_after' ); // After main menu action ?>
            <?php if ( !get_theme_mod( 'ac_disable_minisidebar' ) ) { ?>
            <a href="#" class="browse-more" id="browse-more"><?php echo ac_icon('ellipsis-v', false) // . __( 'Browse', 'justwrite' ) ?></a>
            <?php } ?>
            <?php do_action( 'ac_action_search_btn_before' ); // Before search button action ?>
            <a href="#" class="search-button"><?php ac_icon( 'search' ) ?></a>
            <?php do_action( 'ac_action_search_btn_after' ); // After search button action ?>
    
            <div class="search-wrap nobs">
            	<form role="search" id="header-search" method="get" class="search-form" action="<?php echo esc_url( home_url( '/' ) ); ?>">
                	<input type="submit" class="search-submit" value="<?php _e( 'Search', 'justwrite' ); ?>" />
                	<div class="field-wrap">
    					<input type="search" class="search-field" placeholder="<?php _e( 'type your keywords ...', 'justwrite' ); ?>" value="<?php get_search_query(); ?>" name="s" title="<?php _e( 'Search for:', 'justwrite' ); ?>" />
    				</div>
    			</form>
            </div><!-- END .search-wrap -->
    
        </nav><!-- END .menu-wrap -->
    
        <?php do_action( 'ac_action_menu_wrap_after' ); // After menu wrap action ?>
    
    </div><!-- END .wrap -->
    <?php do_action( 'ac_action_header_wrap_after' ); // After header wrap action ?>
    Theme Author acosmin

    (@acosmin)

    I can’t offer support for issues arising from the use of 3rd party plugins.

    The only thing I can tell you for this issue is that you can replace:

    if( has_nav_menu( 'main' ) ) {
     				wp_nav_menu( array( 'container' => '', 'theme_location' => 'main', 'items_wrap' => '<ul class="menu-main mobile-menu superfish">%3$s</ul>' ) );
    			} else {
    				echo '<ul class="menu-main mobile-menu superfish"><li class="current_page_item"><a href="#">' . __( 'Add a menu', 'justwrite' )  . '</a></li><li><a href="#">' . __( 'Main Menu Location', 'justwrite' )  . '</a></li></ul>';
    			}

    with: ubermenu( 'main-um' );

    That’s all I can say about customization or compatibility.

    The plugin isn’t even hosted on WordPress.org. If it’s a premium plugin you can ask the author for support.

    Thread Starter myhero

    (@myhero)

    Not a problem thanks, I’ve removed all code relating to the menu from the header, replacing it with the php code. Problem solved.

    Thanks for responding though.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Replace WP search with Google search (menu bar)’ is closed to new replies.