Search Box Shortcode in Astra

Astra Pro version 1.5.0 and above provides a shortcode to display a search box. This shortcode can be used anywhere on the website i.e header, footer, page builder, sidebar widgets etc. to display search box.
[astra_search] will display the search icon anywhere you want. Following styles are available for search box –

  • The Slide search – It slides open a search box when you click on the search icon.
  • The Full-screen search – It covers the entire screen
  • The Header cover search – It covers the header
  • The Search box – A default search box if you would like to keep it as it is.

[astra_search] had an attribute ‘direction‘ for the direction this should open the search box on click and attribute ‘style‘ that allows select style from the above list.

Available shortcodes are listed below –

1. The Slide search
Left: [astra_search]
Right:[astra_search direction="right"]

2. The Full-screen search
[astra_search style="full-screen"]

3. The Header cover search
[astra_search style="cover"]
Note: This shortcode will display a search box with respect to its parent class.

4. The Search box
[astra_search style="inline"]

Note: This shortcode is available with Astra Pro plugin. Make sure you activate the Astra Pro plugin and use the latest versions of the Astra theme and the plugin to be able to use this shortcode.

Not the solution you are looking for? Check other articles, or open a support ticket.