Directory / plugin
Ajax Filter Search
v2.0.0 · by Thomas J Dintrone
Displays posts or custom post types in a friendly, filterable format using ajax so there's no page reload!
About this plugin
Ajax Filter Search is a small but powerful plugin that displays your posts or custom post type in a list or grid with category tabs, search, month and year filters and pagination, all using ajax so there’s no page reload.
A visitor can filter your posts by search keyword, month, year and category to get the exact content they’re looking for. It’s a great tool for anyone looking to show a reel of press releases, blog posts, upcoming events, whatever you can think of.
Features
- Gutenberg block and shortcode – Add the “Ajax Filter Search” block, or use the
[ajax_filter_search]shortcode anywhere. - Multiple feeds per page – Every feed has its own post type, categories, layout and filters.
- Shareable links – The first feed on a page keeps its filters and page number in the address bar, so a filtered view can be bookmarked or shared, and the back button works. It also works with JavaScript turned off.
- Fast, light front end – Plain JavaScript (no jQuery), a small stylesheet, and assets that load only on pages that contain a feed. No external fonts or icon libraries.
- Accessible – Labeled form fields, keyboard friendly tabs and buttons, live-region updates and a current-page indicator.
- Easy to theme – Set your accent color in Settings, or override any
--afs-*CSS variable. Developers can override the item template and use filters. - Settings panel – Choose the default post type, taxonomy, posts per page, layout and more under Settings > Ajax Filter Search.
Example shortcodes
[ajax_filter_search]
[ajax_filter_search terms="news,press-releases" posts_per_page="12" layout="grid"]
[ajax_filter_search post_type="event" post_tax="event_type" orderby="title" order="ASC" show_views="false"]
Shortcode attributes
All attributes are optional. Anything you leave out uses the setting from Settings > Ajax Filter Search.
post_type– post type slug.post_tax– taxonomy slug used for the category tabs (ornone).terms– comma separated term slugs to limit the feed to. (filter_byandfilter_typeare accepted as older names for the same thing.)posts_per_page– 1 to 100.layout–listorgrid, the layout the feed starts in.orderby–date,titleormodified.order–DESCorASC.search– a keyword to start with.filter_years/filter_months– start on a year (for example 2025) or month (1 to 12).show_tabs,show_views,show_search,show_months,show_years–trueorfalse.
Please Rate Ajax Filter Search!
Your ratings make a big difference! If you like and use Ajax Filter Search, please consider taking the time to rate the plugin. Your ratings and reviews will help this plugin grow and provide the motivation needed to keep pushing it forward.