Change site style→

style-1 style-2
  1. nazenani
  2. >
  3. >
  4. >
  5. Making searching parts.

Making searching parts.

Searching parts are constructed by 2 parts, search form area and search.php which output searching results.

Search form

To set search form, there are 2 patterns.

1. use function in WordPress
<?php get_search_form( $echo ); ?>
2. describe script.


  • Id of input in search area is “s
  • you can get search words by $_GET[‘s’]
  • Returning $_GET[‘s’] into value, you’ll keep searching word


search.php is output area of searching result.

  • This file is used one file, not dividing taxonomy.php, etc.
  • The values of custom fields are not got in default setting.
  • If you wanna get values of custom fields, do additional methods.


Fields with * is required.

go to related tags archive?