Linux 软件免费装
Banner图

Ajax Filter Search

开发者 longislandfreelancewebdesigner
更新时间 2026年10月30日 22:26
捐献地址: 去捐款
PHP版本: 7.4 及以上
WordPress版本: 7.1
版权: GPLv2 or later
版权网址: 版权信息

标签

shortcode custom post type pagination ajax filter search posts

下载

1.0.4 1.0.1 1.0.3 1.0.2 2.0.0

详情介绍:

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 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. 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.

安装:

Using The WordPress Dashboard
  1. Navigate to 'Add New' in the plugins dashboard
  2. Search for 'Ajax Filter Search'
  3. Click 'Install Now'
  4. Activate the plugin on the Plugin dashboard
Uploading in WordPress Dashboard
  1. Navigate to 'Add New' in the plugins dashboard
  2. Navigate to the 'Upload' area
  3. Select ajax-filter-search.zip from your computer
  4. Click 'Install Now'
  5. Activate the plugin in the Plugin dashboard
Using FTP
  1. Download ajax-filter-search.zip
  2. Extract the ajax-filter-search directory to your computer
  3. Upload the ajax-filter-search directory to the /wp-content/plugins/ directory
  4. Activate the plugin in the Plugin dashboard

屏幕截图:

  • Filtered results, with the filters kept in the address bar so the view can be shared.
  • Grid layout.
  • Two feeds with different settings on one page.
  • The settings screen.
  • The "Ajax Filter Search" block in the editor, with a live preview and controls.
  • The feed on a phone.

升级注意事项:

2.0.0 Major update. Back up your site and test on a staging copy first. The new markup and styles replace the old Bootstrap-based ones, so custom CSS, JavaScript and code that calls the legacy AJAX action may need adjusting. 1.x template overrides keep working. 1.0.4 Security update. Recommended for all users.

常见问题:

What are the steps to getting Ajax Filter Search to display on my website?

  1. Add the "Ajax Filter Search" block, or copy the shortcode [ajax_filter_search], into your page.
  2. Optionally adjust the defaults under Settings > Ajax Filter Search.
  3. View the page and watch Ajax Filter Search fetch your posts.

Is it possible to only display posts from 1 or 2 categories?

Yes. Add the terms attribute with the term slugs you want, separated by commas, for example [ajax_filter_search terms="news,events"]. Make sure the slugs belong to the taxonomy selected for that post type. (If you used filter_by with an older version, it still works.)

Is the ajax functionality secure?

The filters call a read-only REST endpoint (/wp-json/afs/v1/results) that only ever returns published content of public post types. All incoming values are validated and sanitized on the server, and the endpoint cannot change anything on your site, so no nonce is needed.

I'm upgrading from 1.x. What changes?

Version 2.0.0 is a major update. Please back up your site and try it on a staging copy first. The feed has new markup and a small new stylesheet, so custom CSS written for the old Bootstrap-based markup needs updating, and the Font Awesome icon font is no longer loaded. Theme template overrides keep working. A compatibility layer keeps the 1.x functions, constants, the first feed's element IDs, the old script handles and the old ajax action working for now; it is deprecated and can be switched off with add_filter( 'afs_enable_legacy_compat', '__return_false' );. The filter_by attribute now limits a feed to category slugs, as the 1.x readme described; use search for a starting keyword. A short migration guide is in the plugin's GitHub repository (docs/MIGRATION-1.x-to-2.0.md).

Can I change how each result looks?

Yes. Copy afs-template/default.php from the plugin folder into your-theme/afs-template/default.php (a child theme is checked first) and edit it. Templates written for version 1.x keep working. You can also use the afs_query_args and afs_template_file filters.

Does it load anything from third-party servers?

No. Version 1.x loaded Font Awesome from a CDN on every page. Version 2.0.0 loads nothing external.

How do I change the colors?

Pick the accent color under Settings > Ajax Filter Search. For more control, set CSS variables in your theme, for example .afs { --afs-accent: #0a7; --afs-radius: 0; }.

What happens to my data if I uninstall?

The plugin's single settings option is removed when you delete the plugin. Your posts are never touched.

更新日志:

2.0.0 1.0.4 1.0.3 1.0.2 1.0.1 1.0.0