Viewing 23 posts - 1 through 23 (of 23 total)
  • Author
    Posts
  • #726634

    Is it possible to disable the ajax search function in the header?
    And instead use the built in search functionality?

    #726636

    Hey!

    Yes, please go to Enfold theme options > Header > Extra Elements and uncheck “Append search icon to main menu”. Then add following code to Functions.php file in Appearance > Editor

    add_shortcode('avia_search', 'get_search_form');
    
    function add_custom_tooltip(){
    ?>
    <script>
    jQuery(window).load(function(){
    jQuery('.only-mobile-menu-search a').removeAttr('href');
    });
    </script>
    <?php
    }
    add_action('wp_footer', 'add_custom_tooltip');

    then go to Appearance > Menus and add a new Custom Link with # for URL and [avia_search] for navigation field

    Cheers!
    Yigit

    • This reply was modified 7 years, 3 months ago by Yigit.
    #773305

    How to disable ajax? Because i did, now ajax is working still.

    #773927

    Hi,

    Please go to Enfold theme options > Header > Extra Elements and uncheck “Append search icon to main menu”

    Best regards,
    Yigit

    #773930

    Dear Yigit,

    My aim to do the header like this: http://imgur.com/a/6DdmP
    I unchecked, when i try search preloading th emagnify and working like enfold search.

    Ty,

    d.

    #774275

    Hi,

    May you share with us your website link and the WP credentials, please?

    Best regards,
    John Torvik

    #774906

    Hi John.

    Here i did a test:
    http://studiobest.hu/test/wp-admin/
    demo
    demo123
    – Elements and unchecked “Append search icon to main menu
    Pls check it,
    ty,
    d.

    • This reply was modified 6 years, 11 months ago by dwebprojects.
    #776237

    Hi dwebprojects,

    Well, you can give the text input in that form a different ID and write your custom logic where you will have to handle that form submit. Or give the form the class of “av_disable_ajax_search” and you will have to handle submit yourself.

    If you need further assistance please let us know.

    Best regards,
    Victoria

    #779870

    d.

    • This reply was modified 6 years, 11 months ago by dwebprojects.
    #780272

    Hi @dwebprojects,

    Not sure if you need any further help or not?

    Best regards,
    Rikard

    #780564

    Dear Sir,

    How can i do to have an search result page with only postgrid with images and titles from only like fashion category?

    Ty,

    d.

    #780596

    Hi,

    Please refer to this post – Please refer to this post – https://kriesi.at/support/topic/grid-style-search-results-with-sidebar/

    Best regards,
    Yigit

    #780610

    Sorry, where to put and which code?

    Ty,

    d.

    #780845

    Hi,

    It should be on search.php file. Hope this helps.

    Best regards,
    Nikko

    #791226

    Hey! I tried to hide the icon search and insert de Search Field too.
    The code is okey, but i cant see the search field beacuse is below the Slide. How could i fix it?

    #791227

    Sorry, this is the site link laboratorioseurolab.com

    #792108

    Hi,

    Please add the following css codes:

    #top #searchform>div {
        opacity: 1 !important;
        display: block !important;
        bottom: 68px;
    }
    
    #top #searchform .ajax_search_response {
        background: #ffffff;
    }

    Best regards,
    Ismael

    #792501

    Genius Ismael! Thank you so much for your help!

    #792503

    Isamel!
    I am sorry i thought it was ok, but click on the results are not working.
    I leave you an user in private content.

    #793155

    Hi,

    What is the actual code that used to display the search field? Please remove the modification then add this code in the functions.php file:

    add_filter( 'wp_nav_menu_items', 'avia_append_search_side_nav', 10, 2 );
    function avia_append_search_side_nav( $items, $args )
    {
    	if (is_object($args) && $args->theme_location == 'avia')
    	{
    		global $avia_config;
    		ob_start();
    		get_search_form();
    		$form = ob_get_clean();
    
    		$items .= '<li id="menu-item-search" class="noMobile menu-item menu-item-search-dropdown">'.$form.' </li>';
    	}
    	return $items;
    }
    

    In the Quick CSS field, use this:

    #top .menu-item #searchform {
        top: 26px;
        position: relative;
    }
    
    #top #searchform > div {
        opacity: 1 !important;
        display: block !important;
    }
    

    Best regards,
    Ismael

    #793348

    Hi Ismael! The code you send me recently (function.php) doesn’t work, and breaks all the site. I replaced for the previus code.
    And this is the previus code that i’ve added on function.php:

    add_shortcode(‘avia_search’, ‘get_search_form’);
    function add_custom_tooltip(){
    ?>
    <script>
    jQuery(window).load(function(){
    jQuery(‘.only-mobile-menu-search a’).removeAttr(‘href’);
    });
    </script>
    <?php
    }
    add_action(‘wp_footer’, ‘add_custom_tooltip’);

    #793359

    Ismael! sorry.
    I forgot to take out a short code in the Quick Css, that was the problem i think.
    It’s working perfect now!

    Thanks!

    #793696

    Hi,

    Great, glad you got it working and thanks for the feedback. Please let us know if you should need any further help on the topic.

    Best regards,
    Rikard

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