Want to add search to WordPress run websites?
Often times search is easily added through Widgets, or sometimes it is built into a theme already. But, what if you want the search in the footer or to appear at the bottom of every page? Using the PHP code provided below you’ll be able to add search functionality to your site in no time:
<?php get_search_form(); ?>
Adding Search to WordPress Footer
Click on the file name footer.php in the Dashboard editor. Then paste the code into an area on the footer that is in relation to the copyright area of the code. You’ll be able to tell by site info PHP code. Paste the code above the copyright code and see how that looks. If it looks bad try adding it below the copyright info. If it still looks bad, or out of place, you will need to use CSS to control it’s location and placement.
Adding Search to Bottom of Every WordPress Page
Click on the file name page.php in the Dashboard editor. Then paste the code into the space right above the PHP code that calls the footer, which usually looks something like this: <?php get_footer(); ?>
That’s how you add search to WordPress sites, and there are many other places that code can be added.