Display A WordPress Search Form

Paulund is full of premium tutorials and support to help with your development

Sign up to get full access to all tutorials.

Get full access for $5/mo

Login to your account


Wordpress has an built in search facility which will allow you to search for keywords within your posts search in either the post title or the post content. In order for Wordpress to perform a search on your posts and return the search results page it will need to have a $_GET variable of s. When Wordpress finds this query string parameter it will perform a search on the value of this parameter. You can't ask your users to type in a query string of ?s=search%20wordpress whenever they want to search for something so you need to provide them with a search form, where they can type in the keywords, hit search and we will return a list of posts for them to choose from. This content is restricted to subscribers