Tagged: ,

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #695136

    Hello,
    I have successfully moved the Search to the Top Bar of my site, and it works correctly. We did this by using your suggestion to do the following:
    In “functions-enfold”, I have replaced
    if ((is_object($args) && $args->theme_location == ‘avia’) || (is_string($args) && $args = “fallback_menu”))

    with

    if ((is_object($args) && $args->theme_location == ‘avia2’) || (is_string($args) && $args = “fallback_menu”))

    However, I am wanting to have the search be a text box that is NOT in a modal popup. How can I eliminate the “click to popup” search field, and simply embed the field instead? Also, need to make sure that the ajax results aren’t on a transparent background, and are in front of the navigation menu?

    Here is an image of what we have achieved on our development server so far:
    https://snag.gy/ar8fUI.jpg

    #695318

    Hi nickydef,

    Could you post a link to the site in question so that we can take a closer look please?

    Regards,
    Rikard

    #695424

    It’s on our local machine, under development, and is not publicly accessible! However, it is a standard installation of version 3.8, and is using “Logo left, Menu right” with “Header Phone Number/Extra Info” and “Header Secondary Menu” displayed in the top bar at the right. Used the code above to display the search in the top bar instead of next to the navigation menu.

    #696103

    Hi,

    Please add following code to Functions.php file in Appearance > Editor

    add_shortcode('avia_search', 'get_search_form');

    then add following shortcode into your secondary menu as a new custom link

    [avia_search]

    Best regards,
    Yigit

    #696108

    What other steps? All that does is add a link that goes nowhere when clicked? That doesn’t add a form…
    Do I need to remove the changes I have made to the “functions-enfold” file shown above?

    Here’s what I got by adding the code you’ve provided, and adding a Custom Link to the menu – had to give it a Navigation Label of “Search”, or it wouldn’t save it.
    https://snag.gy/kZqh0s.jpg

    #696113

    **UPDATE** – Added the shortcode to the “Phone Number or small info text” area, and this does work – kind of…

    It adds the search form (I’ll need to style it with quick css), but uses ajax to show search results, and makes the top bar push all other content down, and has a transparent background? How do I disable the ajax results, and just have the results come up in a separate page?
    See image: https://snag.gy/HO57zo.jpg

    #696804

    Hey!

    Please add this code in the functions.php file to disable the ajax search functionality.

    add_action('after_setup_theme', 'ava_disabled_ajax_search');
    function ava_disabled_ajax_search() {
    	//now hook into wordpress ajax function to catch any ajax requests
    	remove_action( 'wp_ajax_avia_ajax_search', 'avia_ajax_search' );
    	remove_action( 'wp_ajax_nopriv_avia_ajax_search', 'avia_ajax_search' );
    }

    Best regards,
    Ismael

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.