Advertisement
fauzanjeg

Add Search Form after Header

Aug 9th, 2021 (edited)
179
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.54 KB | None | 0 0
  1. /* Add Search Form after Header */
  2. function add_search_form() {
  3.     if ( is_search() ) return;
  4.     ?>
  5.     <div class="jeg_archive_search">
  6.         <form action="http://localhost/wordpress2/" method="get" class="jeg_search_form" target="_top">
  7.             <input name="s" class="jeg_search_input" placeholder="Search..." type="text" value="" autocomplete="off">
  8.             <button aria-label="Search Button" type="submit" class="jeg_search_button btn"><i class="fa fa-search"></i></button>
  9.         </form>
  10.     </div>
  11.     <?php
  12. }
  13. add_action( 'jnews_element_below_header', 'add_search_form' );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement