search box within page not working

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

 
Participant
5 years, 10 months ago.

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #7935

    Participant

    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

    #7936

    Participant
    You cannot access this content.
    #7937

    Hi!

    I would probably try to replace the header code you just pasted with the following modification:

    <!– search –>
    <?php if ( empty( $data&#91;'head_show_search'&#93; ) || ( !empty($data&#91;'head_show_search'&#93;) && $data&#91;'head_show_search'&#93; == 'yes') ) { ?>
    
    <div id="search">
    <span class="icon-search icon-white"></span>
    <div class="search">
    <?php echo do_shortcode('&#91;wpdreams_ajaxsearchpro id=&#93;'); ?>
    </div>
    </div>
    <!– end search –>
    Best,
    Ernest Marcinko

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


    #7941

    Participant

    Hi 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

    #7951

    Hi!

    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 :)


    #7952

    Participant

    Thanks for letting me know… I will test it out and keep you posted if all is fine..

    #7967

    Participant

    Hi 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 –>

    #7973

    Hi!

    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 :)


    #7987

    Participant
    You cannot access this content.
Viewing 9 posts - 1 through 9 (of 9 total)

The topic ‘search box within page not working’ is closed to new replies.