Add Search To WordPress Site

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.

Jophiel Silvestrone

Written by: Jophiel Silvestrone

Jophiel Silvestrone has written 163 posts in the Tech Blog.

Jophiel grew up on a ranch in Paradise Valley, Montana near Chico Hot Springs. Working on the ranch instilled work ethic and self motivation. Filled with this drive, Jophiel started mowing the local school's yards twice a month throughout the summers, at the age of 12. He moved to Billings in 2004, where he has been deeply involved in the local business community ever since. A serial entrepreneur, Jophiel has ran multiple businesses in our local community. He now runs a web development company SkyPoint Studios. One of his favorite jobs though, is fathering his 11-year old son Jaoquin. "JJ" also loves technology.

0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.