| 开发者 |
narinder-singh
satindersingh coolplugins eventscalendaraddons |
|---|---|
| 更新时间 | 2026年11月5日 13:34 |
| 捐献地址: | 去捐款 |
| PHP版本: | 7.4 及以上 |
| WordPress版本: | 7.1 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
[events-calendar-search]
Out of the box that's an event search box with type-ahead suggestions. Turn on the date filter and a results region in the settings panel, and the panel writes the shortcodes for you — including the second tag that marks where the filtered event list appears:
[events-calendar-search facets="search,date" results-mode="inline" target="events"]
[events-calendar-search-results target="events"]
You never have to type either by hand. Design the bar in the panel, then copy both tags with one click.
Shortcode attributes
Every attribute below is optional. Leave one out and it inherits your saved setting, so a bare [events-calendar-search] follows the settings panel and you only add an attribute where one placement should differ.
[events-calendar-search] — the search bar
What the bar contains and does
facets — which filters the bar shows. search, date, or search,date. Category, tag, venue, organizer and location filters are Pro.search-fields — which field the keyword matches. title. Description, venue name and organizer name are Pro.typeahead — the suggestions dropdown. dropdown (default) or off.results-mode — where events appear. inline (a results block on this page) or none (dropdown suggestions only). A separate results page is Pro.target — an id that links this bar to its results region, e.g. target="events". Use the same value on both shortcodes.filters-visibility — where the filters sit. expanded (all options on show, the default) or bar_inline (inside the bar's keyword row). Behind a Filters button, or permanently below the bar, are Pro.filter-style — how a filter trigger looks. text. Pill, dropdown and filled styles are Pro.placeholder — the text inside the empty search box.bar-template — the bar frame. unified (default, one joined bar) or detached (separate field and button).button-style — the search button. solid_icon (default), solid, outline, icon, text or none.accent-color, text-color, bg-color — hex colours, e.g. accent-color="#0f766e".control-size — the control scale as a percentage, 80–140 (default 100).corner-radius — corner rounding in pixels, 0–24 (default 8).view — grid (default) or list.per-page — events per page, 1–50 (default 12).columns — grid columns, 2–5 (default 3).card-size — card scale as a percentage (default 100).card-fields — which parts of an event card show, from image, title, date, venue, cost, e.g. card-fields="image,title,date".date-format — how the event date reads. site (default, your WordPress format), long, medium, dmy or iso.template — the card design. clean. The Modern card design is Pro.[events-calendar-search-results] — a standalone event list
Place this wherever the filtered events belong; it shares state with the bar through target. It accepts target, view, per-page, facets, search-fields, columns, card-size, card-fields, date-format, template, accent-color, text-color, bg-color, control-size and corner-radius — the same values as above.
Examples
A search box on its own, no event list:
[events-calendar-search results-mode="none"]
A search box with a date filter, and the event list below it in a two-column grid:
[events-calendar-search facets="search,date" results-mode="inline" target="events"]
[events-calendar-search-results target="events" view="grid" columns="2"]
A compact bar in a sidebar widget, matching your brand:
[events-calendar-search bar-template="detached" button-style="icon" accent-color="#0f766e" control-size="90"]
Events as a plain list, 24 per page, showing only title and date:
[events-calendar-search-results target="events" view="list" per-page="24" card-fields="title,date"]
Upgrading from version 1.x? The old layout, show-events, disable-past-events and content-type attributes are still accepted and mapped onto the new engine, so shortcodes already published on your site keep working untouched.
Events Search & Filter Bar Pro
Everything above is free and stays free. If you need more than a keyword box and a date filter, Events Search & Filter Bar Pro adds:
[events-calendar-search]
That renders an event search box with a type-ahead dropdown, using the shipped defaults.
Step 4: Turn on the date filter and the event list
Open Events Addons → Search & Filter Bar. The editor has four sections:
No — it is an event calendar addon. It does not create or manage events; The Events Calendar does that. This plugin adds the front-end event search bar, the date filter and the filtered event list that a growing calendar needs so visitors can find the event they came for.
Yes. It works with the free version of The Events Calendar and alongside Events Calendar Pro. All event queries go through The Events Calendar's own query layer, so your recurring events, timezones and venue data behave the way that plugin already handles them.
Paste [events-calendar-search] into any page, post, or widget. It works immediately, with no setup. To customize it, design the bar in Events Addons → Search & Filter Bar and copy the shortcodes the panel writes for you.
Keyword search matches the event title. The date filter offers presets (Today, Tomorrow, This weekend, This week, Next week, This month, Next month) or a custom date range. Visitors can also switch between grid and list, and re-sort by date or title, from the results toolbar. Searching event descriptions, venue names and organizer names, and filtering by category, tag, venue, organizer or location, are Pro features.
Yes. The date filter ships with seven presets and a custom date range, and it matches multi-day events correctly in your site's timezone. Every date filter is reflected in the URL, so a "this weekend" view can be linked or bookmarked.
On the same page as the bar. In the settings panel, set "Where results appear" to Below the bar and paste the second shortcode — [events-calendar-search-results] — wherever the event list belongs. If you'd rather not show a list at all, choose Dropdown suggestions only and the type-ahead is the whole experience. Sending results to a separate page is a Pro feature.
Yes. Choose Swap its controls only for the events page and, on its List view, this plugin replaces the two control rows The Events Calendar ships — its search box, its List/Month/Day links and its date navigation — with your bar. Its event results keep rendering, driven by your search and date filter, and the page title, breadcrumbs and its own messages are left alone. Replacing the whole List view with your own results is a Pro feature.
Yes. The events archive is not a normal WordPress page, so there is nowhere obvious to give it a heading. When the events-page option is on, an Events Page Title field appears in the settings panel; whatever you type renders above the search bar. Leave it blank and nothing is added.
Yes. The bar is placed with a shortcode, and every editor and page builder can output one — the block editor has a Shortcode block, and Elementor, Divi, Beaver Builder, Bricks and WPBakery all have a shortcode widget. Paste the shortcode there and the bar renders exactly as it does anywhere else. A classic widget is included for widget areas.
Yes. The old widget still renders, with its saved settings mapped onto the new engine, so nothing you already placed disappears. It's kept for compatibility only — for anything new, use the shortcode.
Yes. The keyword, the date filter, the sort, the layout and the page number are all stored in the URL, so any filtered view can be bookmarked, linked or shared, and the browser back and forward buttons work as expected.
Yes. The bar uses a proper combobox/listbox keyboard pattern, keeps focus in the input while navigating suggestions, announces the result count to screen readers through a polite live region, and falls back to a working form when JavaScript is disabled.
No. Search runs on the server with bounded, paginated, cached queries — capped at 50 results per request, and your event catalogue is never sent to the browser. Public REST routes are rate-limited and capped, and the front-end CSS and JavaScript load only on pages that actually render a bar or a results list.
No. Only published events are searched, and password-protected events are excluded from results and from the type-ahead suggestions.
Yes. All queries go through The Events Calendar's own event query layer, so recurring events and time zones are handled the way The Events Calendar handles them. In the Results section you can choose whether a recurring event appears once (its next occurrence) or as every occurrence.
Yes. Every string in the plugin — including the ones rendered by JavaScript — is translatable through the events-search-addon-for-the-events-calendar text domain, and Spanish, French, German, Italian and Brazilian Portuguese translations are bundled.
You can report security bugs through the Patchstack Vulnerability Disclosure Program. The Patchstack team helps validate, triage, and handle any security vulnerabilities. Report a security vulnerability.
[events-calendar-search-results] shortcode, so the event list can be placed independently of the bar.content-type attribute for basic and advance suggestions.