Reply To: Not acting as default search

#612
Ernest Marcinko
Ernest Marcinko
Keymaster

Hi!

To integrate the search into the template, you need to edit the template files, locate the template’s default search, then replace it with the ajax search pro shortcode. It requires intermediate knowledge of php/html and wordpress.

Usually the search is located in the template’s head.php or header.php file.
It’s ethier displayed with the built in function

 <?php get_search_form( $echo ); ?> 

or something like this

<form role="search" method="get" id="searchform" action="<?php echo home_url( '/' ); ?>">
    <div><label class="screen-reader-text" for="s">Search for:</label>
        <input type="text" value="" name="s" id="s" />
        <input type="submit" id="searchsubmit" value="Search" />
    </div>
</form>

Basically you need to locate this (or similar) search code in the template and replace it with the ajax search pro shortcode, which you can get in the plugin settings page. ( )

There is no exact way of doing this, since every template can have it’s own code, which is probably different for every template.

You can read more about this here: http://codex.wordpress.org/Function_Reference/get_search_form

  • This reply was modified 10 years, 8 months ago by Ernest Marcinko Ernest Marcinko. Reason: wp link
Best,
Ernest Marcinko

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