No results found. Try again with different words?

Search must be at least 3 characters.

Search Shortcode to Add Search Box in Astra

Sidebar Image

Did not find a solution? We are here to help you succeed.

Astra Pro Addon plugin 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 the search box.

will display the search icon anywhere you want. The following styles are available for the 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.

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"]
Astra Search Filter

Note: This shortcode is a premium feature available with the Astra Pro Addon plugin. To use these Pro features, you need to have the Astra theme along with the Astra Pro Addon installed on your website.

You can simply use the shortcode block anywhere on your website. Copy and paste the above codes to insert them into your website.

How to add shortcode

If you are looking for adding a shortcode to your menu item, please consider using a third-party plugin such as ShortCode in Menus. Please know that this plugin is not developed by us and we highly recommend taking a backup of your website before installing it. Here is an article that will guide you on how to take a backup of your website.

Alternatively, you can also use the default Header Builder to add a search button on your menu. Here is an article that will guide you through.

Was this article helpful?
Sidebar Image

Did not find a solution? We are here to help you succeed.

Related Docs

Join 1,653,898+ Happy Site Owners Using Astra

Whether you are a beginner, small business owner, or professional web developer, Astra provides all the tools you need to easily build your beautiful WordPress website.

Download is Just A Click Away!

Membership Retention Checklist Download

REWIND

YEAR IN REVIEW

Download is Just A Click Away!

Enter your email address and be the first to learn about updates and new features.

Download Free Astra Theme - Modal Popup Form
Scroll to Top
Now choose your preferred
page builder addon
Choose your preferred page builder addon

Download is Just A Click Away!

Enter your email address and be the first to learn about updates and new features.

Download Free Astra Theme - Modal Popup Form