Cannot click in search field…

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Cannot click in search field…

This topic contains 4 replies, has 2 voices, and was last updated by Keith Groben Keith Groben 10 years ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #1611
    Keith Groben
    Keith Groben
    Participant

    I added this code in my header file: <?php echo do_shortcode(‘[wpdreams_ajaxsearchpro id=1]‘); ?>

    It is replacing the regular WP search bar in the 2014 theme.

    <div id=”search-container” class=”search-box-wrapper hide”>
    <div class=”search-box”>
    <?php echo do_shortcode(‘[wpdreams_ajaxsearchpro id=1]‘); ?>
    <?php // get_search_form(); ?>
    </div>
    </div>

    The problem is… I cannot click in the search field. How do I fix this?

    #1612
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi!

    I see that the search field is inside a hidden div and it only activates after clicking the search icon. The problem is, that one of the important events is not firing this way. Luckily, there is a very easy fix for that. Put this code in the site header of footer:

    <script>
    aspjQuery(document).ready(function(){
      aspjQuery('.search-toggle').click(function(){
        aspjQuery(window).resize();
      })
    });
    </script>
    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #1614
    Keith Groben
    Keith Groben
    Participant

    Thanks for getting back to me quickly. I did put the code in the header, in the <head> tag. Unfortunately this had no effect. Could you recommend anything else?

    #1615
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    I see 🙂 The problem is that it’s almost on the top of the head tag, and the javascript files are not loaded yet. Try to locate the wp_head(); call in the template header file, and if you put it just under there, it should work then 🙂

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #1616
    Keith Groben
    Keith Groben
    Participant

    This works perfectly now! Thank you for your help. This plugin is the best search bar I’ve seen by far. Keep it up!

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.