How To Position A Search Form In Any WordPress Themes Nav Menu

Once you’ve added some PHP code in your child themes functions file, you’ll need to position the search form.


To do this, you need to tell the browser exactly which position you want the search form to display.

Here’s some sample CSS code which you can modify depending on which theme you use and where you want your search form positioned.

Note: The following sample CSS may need modifying as all themes are coded differently.

.search {
    position: absolute;
    right: 105px;
    padding-top: 15px;
    width: 360px;
    list-style-type: none;
}

And here’s the result tested on one theme.

add search form to nav menu

This solution may require a bit of work on your behalf when it comes to the CSS as all themes use different code and there’s too many to provide working code for this solution.

Was This Tutorial Helpful?

Free

$0

Access only to all free tutorials per month.



Monthly

$75

Access to 10 premium tutorials per month.


Tutorial Request


Includes code guarantee and coding support.

Yearly

$500

Access to 15 premium tutorials per month.


Monthly Tutorial Request


Includes code guarantee and priority coding support.