Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › search box within page not working
This topic contains 8 replies, has 2 voices, and was last updated by ams13 6 years, 10 months ago.
- AuthorPosts
- March 7, 2016 at 5:40 pm #7935
Hi
I have just purchased your plugin, and I thought I try out your search ajax plugin as it looks nice but it is simply not working.
I currently use relevanssi, and disabled it to try your plugin. The problem is as follows:
I have search icon on each page on my theme which has an expandable search box when you click on it; however, when I type on it, no ajax result shows up. It works fine if I use your shortcode on a separate page but it simply does not “replace the default theme search icon with the ajax results.
Below is my code on header for search box. Where do I need to amend your code <?php echo do_shortcode(‘[wpdreams_ajaxsearchpro id=1]‘); ?>
My search icon/box code from header.php
<!– search –>
<?php if ( empty( $data[‘head_show_search’] ) || ( !empty($data[‘head_show_search’]) && $data[‘head_show_search’] == ‘yes’) ) { ?><div id=”search”>
<span class=”icon-search icon-white”></span>
<div class=”search”>
<form id=”searchform” action=”<?php echo home_url(); ?>” method=”get”>
<input name=”s” maxlength=”20″ class=”inputbox” type=”text” size=”20″ value=”<?php echo __( ‘SEARCH …’, THEMENAME );?>” onblur=”if (this.value==”) this.value='<?php echo __( ‘SEARCH …’, THEMENAME );?>’;” onfocus=”if (this.value=='<?php echo __( ‘SEARCH …’, THEMENAME );?>’) this.value=”;” />
<input type=”submit” id=”searchsubmit” value=”go” class=”icon-search”/>
</form>
</div>
</div>
<!– end search –>Thanks
AMS
March 7, 2016 at 5:49 pm #7936You cannot access this content.March 7, 2016 at 5:49 pm #7937Hi!
I would probably try to replace the header code you just pasted with the following modification:
<!– search –> <?php if ( empty( $data['head_show_search'] ) || ( !empty($data['head_show_search']) && $data['head_show_search'] == 'yes') ) { ?> <div id="search"> <span class="icon-search icon-white"></span> <div class="search"> <?php echo do_shortcode('[wpdreams_ajaxsearchpro id=]'); ?> </div> </div> <!– end search –>
-
This reply was modified 6 years, 10 months ago by
Ernest Marcinko.
-
This reply was modified 6 years, 10 months ago by
Ernest Marcinko.
-
This reply was modified 6 years, 10 months ago by
Ernest Marcinko.
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
March 7, 2016 at 6:10 pm #7941Hi Ernest,
Thanks for your prompt update.
I tried it and it did not work. The search icon becomes unclickable and simply became in icon image – it disabled the search feature I have reverted it back so you can login and try it to see the code provided does not work, and disabled the search box.
Please assist.
Thanks
Kind Regards,
AMS
March 8, 2016 at 2:06 pm #7951Hi!
I think it was because I forgot to specify the ID in my previous response. I have logged in via FTP and added the shortcode correctly, now it displays the ajax search pro search form.
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
March 8, 2016 at 4:08 pm #7952Thanks for letting me know… I will test it out and keep you posted if all is fine..
March 9, 2016 at 4:13 pm #7967Hi Earnest
Sorry, I think I messed up. Your edit got overwritten somehow, and does not display the ajax search.
I now added the code with the ID but it still did not work. Can you please paste the correct code here so I can try this at my end.
Thanks and apologies for this issue.
AMS
Here is your code with the ID
<!– search –>
<?php if ( empty( $data[‘head_show_search’] ) || ( !empty($data[‘head_show_search’]) && $data[‘head_show_search’] == ‘yes’) ) { ?><div id=”search”>
<span class=”icon-search icon-white”></span>
<div class=”search”>
<?php echo do_shortcode(‘[wpdreams_ajaxsearchpro id=1]‘); ?>
</div>
</div>
<!– end search –>March 10, 2016 at 11:49 am #7973Hi!
I’ve made the modification again, it should be working now. Make sure to back-up the header.php file in case something goes wrong 🙂
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
March 12, 2016 at 11:13 am #7987You cannot access this content. -
This reply was modified 6 years, 10 months ago by
- AuthorPosts
The topic ‘search box within page not working’ is closed to new replies.