Replace default search

Hi i would like to replace the default search with ajax search pro.

please let me know how i can do this

thanks

Hello Rexneel,

Thanks for writing in!

Ajax Search Pro is a 3rd party plugin. We are not familiar or have used this plugin. It is best that you contact the creators of this plugin on how you can integrate it to your site. You may also need to check out the plugin documentation which can be found here:

Hope this helps.

Hi thanks, I just need to know which part of the theme to edit for search. where its located

Hello Rexneel,

The search form can be edited in the searchform.php file. And because what you are trying to accomplish requires a template customization, we would highly to suggest that you use a child theme. This allows you to make code changes that won’t be overwritten when an X update is released.

Once you have your child theme active and ready, please follow these steps below:
1] Using Notepad or TextEdit or Sublime Text or any text editor, please create a new file in your local machine.
2] Insert the following code into that new file

<?php

// =============================================================================
// SEARCHFORM.PHP
// -----------------------------------------------------------------------------
// Template for displaying search forms in X.
// =============================================================================

?>

<form method="get" id="searchform" class="form-search" action="<?php echo esc_url( home_url( '/' ) ); ?>">
  <label for="s" class="visually-hidden"><?php _e( 'Search', '__x__' ); ?></label>
  <input type="text" id="s" class="search-query" name="s" placeholder="<?php esc_attr_e( 'Search', '__x__' ); ?>" />
</form>

Do not forget to add your modifications as well.

3] Save the file named as searchform.php
4] Upload this file to your server in the child theme’s folder wp-content/themess/x-child/

Hope this helps.

thank you so much

You’re welcome, Rexneel.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.