Search Bar Widget

Search Settings

Connect the search bar to a post widget and choose how searches are submitted.

Options:

SettingPurposeDetails
Post Widget TargetChoose the post widget the search bar controls.Pick a Post, Loop Grid, Loop Carousel, Posts or Elementor V4 Loop widget from the dropdown. It lists the widgets present on the page. When a target is set, the search runs through AJAX and the page doesn’t reload. If you leave the dropdown empty and the page contains only one post widget, the search bar connects to it automatically. If it can’t find a target, it shows a warning in the browser console. The dropdown is hidden while a Custom Target Selector is filled in.
Custom Target SelectorTarget a widget by CSS ID or class instead of using the dropdown.Use this for advanced setups, or to drive several widgets with one search bar. Separate multiple selectors with commas, for example #news-grid, .events-grid. The Post Widget Target dropdown is hidden while this field has a value.
Post Type to FilterSelect the type of content to search.Choose a post type, or Targeted Widget to use the post type of the target widget. To combine the search bar with Filter and Sorting widgets, point them all at the same target. When a Filter widget is used with the search bar, the Filter widget’s post type takes priority.
PlaceholderSet the text shown inside the empty search field.Tells visitors what to search for. Default: “Search by keywords…”.
Display Submit ButtonShow or hide the search button.The button is off by default. Without it, visitors submit a search by pressing Enter.
Button TextSet the label of the search button.Available when Display Submit Button is on. Default: “Search”.
Redirect After SubmissionSend visitors to another page to see their results.When on, submitting the search takes visitors to the Redirect URL. The search term is passed along and the results are filtered on that page. Use it for a search bar in a header or sidebar that should lead to a results page.
Redirect URLSet the page visitors are sent to.Available when Redirect After Submission is on. The destination page needs a post widget, and a Filter or Search Bar widget targeting it, so the search term can be applied there. If you leave the URL empty, the search bar behaves as if redirect were off.
Elementor Template IDHelp the search bar find the target widget inside an Elementor Pro template.Leave empty for automatic detection. If the search returns an error 500 inside a template, enter the ID of the template that contains the target widget.

How search behaves:

  • With a target and no redirect: the results update in place, without reloading the page. If the target has pagination, it goes back to the first page.
  • With a redirect: the page reloads at the Redirect URL and the results are filtered on arrival.
  • With no target and no redirect: the form submits to the current page as a standard WordPress search.
  • The search uses WordPress’s built-in search. Clear it with the Filter widget’s Reset button, which also empties the search field when they share a target.

Tips:

  • For a live-feeling search, leave the submit button off. Visitors type and press Enter.
  • Give the Search Bar, Filter and Sorting widgets the same target, so they work together on one set of results.