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 10 years, 5 months ago.
- AuthorPosts
- April 2, 2014 at 10:32 pm #1611
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?
April 3, 2014 at 7:43 am #1612Hi!
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 :)
April 3, 2014 at 5:13 pm #1614Thanks 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?
April 3, 2014 at 5:37 pm #1615I 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 :)
April 3, 2014 at 5:45 pm #1616This works perfectly now! Thank you for your help. This plugin is the best search bar I’ve seen by far. Keep it up!
- AuthorPosts
You must be logged in to reply to this topic.