Marcel wanted to know how a search form can be added in between paragraphs in a Page or Post in WordPress.
While it is possible to use a plugin that enables PHP in WordPress editor, it is not recommended.
In this article I show how we can create a shortcode that outputs the search form and use this shortcode wherever you want.
Add the following in your child theme’s functions.php:
|1 2 3 4 5 6 7 8 9 10 11 12 13 14|
Now wherever you wish to display search form, place this shortcode: [my_search]
(Optional) Depending on your current active theme you may want to add CSS.
For example, in Genesis Sample:
|1 2 3 4 5 6 7|