I'm creating a website in which I need that, when I click on one of the tabs of the specific menu, and it opens, this page contains a search box in its body. My question is how can I add this search box to the page, where can it be edited.

I've now started using WordPress, I've been doing a search but I haven't found anything that specifically answers me.

  • The best you can do is to put the get_search_form in a shortcode and use that shortcode in the content of your page.
    – Amirition
    Jun 8, 2021 at 11:54

2 Answers 2


It's just a form that takes a GET parameter named s.


<form method="get" action="/">
<input type="text" name="s" placeholder="type here to search">

But I recommend using the function called get_search_form() that does basically the same thing.


If you're using the block editor, as of WordPress 5.3 there is a Search block that you can use: https://wordpress.org/support/article/search-block/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.