[WordPress] 外掛分享: Ajax Filter Search: Filter Posts by Category, Date & Keyword

首頁 › 外掛目錄 › Ajax Filter Search: Filter Posts by Category, Date & Keyword
WordPress 外掛 Ajax Filter Search: Filter Posts by Category, Date & Keyword 的封面圖片
50+
安裝啟用
★★★★☆
4.5/5 分(2 則評價)
4 天前
最後更新
—
問題解決
WordPress 6.0+ PHP 7.4+ v2.3.1 上架:2016-07-22

內容簡介

Ajax Filter Search 是一個小而強大的外掛,能以表格格式並搭配分頁的方式顯示文章或自訂文章類型,全部使用 Ajax 技術,因此不需要重新載入頁面!

使用者可以透過搜尋關鍵字、月份、年份和類別來過濾您的文章,以便找到他們想要的精確內容。這是一個很棒的工具,適用於任何想展示新聞稿、部落格文章、即將到來的活動等內容的人!

功能

設定面板 - 透過更新各種外掛設定(請參考螢幕截圖)來自訂您的 Ajax Filter Search 版本。
可自訂短碼 - 能夠開始透過自訂短碼屬性來覆寫一般設定中預設值的過程,未來這將使您能夠在整個網站上放置多個短碼。 目前,您可以添加“filter_by”屬性以顯示所選類別/分類到預設查詢。

範例短碼
[ajax_filter_search filter_by="category-slug-1,category-slug2"]

測試瀏覽器

Firefox(Mac、PC)
Chrome(Mac、PC、iOS、Android)
Safari(Mac、iOS)
IE10+

請給 Ajax Filter Search 評分!

您的評分意見非常重要!如果您喜歡和使用 Ajax Filter Search,請考慮花點時間 評分我的外掛。您的評分和評論將有助於這個外掛成長,並提供推動它前進的動力。

外掛標籤

開發者團隊

⬇ 下載最新版 (v2.3.1) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「Ajax Filter Search: Filter Posts by Category, Date & Keyword」→ 直接安裝(推薦)
📦 歷史版本下載

原文外掛簡介

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.
Choose from four designs: an Editorial Grid of image cards with category badges, excerpts and dates, a compact Resource Library of searchable rows with thumbnails, the clean Modern design, or the original Classic look. The two newest designs take their colors from your theme, so they work on dark themes too.
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.
Editorial Grid and Resource Library designs – Image cards with category badges, excerpts and dates, or compact rows with optional thumbnails. Choose what each one shows (featured image, image shape, columns, excerpt length, date, time, category badge) under Settings > Cards, or per feed.
Modern and Classic designs – A clean, card-based Modern design for new installs and the original Classic look for sites that already use the plugin. Choose one site wide or per feed.
Works with dark themes – The Editorial Grid and Resource Library take their borders, surfaces and text from your theme’s colors, with no extra setting.
Block patterns – Add a ready-made Editorial Grid or Resource Library from the block inserter in one click, then change anything in the block sidebar.
Pick terms by name – In the block, choose the categories to limit a feed to from a searchable list instead of typing slugs.
Sort and filter chips (optional) – Let visitors sort by newest, oldest, A to Z, recently updated or most commented, and show the active filters as removable chips with a Clear all link. Both are off until you turn them on.
RSS feed for any view – Every filter state has its own RSS 2.0 feed at /wp-json/afs/v1/feed, built from the same query as the results and listing published posts only.
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"]

[ajax_filter_search design="editorial" columns="3" image_ratio="16:10" excerpt_length="25"]

[ajax_filter_search design="library" show_sort="true" show_chips="true"]

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 (or none).
terms – comma separated term slugs to limit the feed to. (filter_by and filter_type are accepted as older names for the same thing.)
posts_per_page – 1 to 100.
layout – list or grid, the layout the feed starts in.
orderby – date, title or modified. order – DESC or ASC.
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 – true or false.
design – modern, classic, editorial or library. Overrides the Appearance setting for this feed.
Card options for editorial and library (Classic and Modern ignore them; anything you leave out uses Settings > Cards): show_image, show_excerpt, show_date, show_time, show_category – true or false. image_ratio – 16:10, 3:2, 4:3, 1:1 or 16:9 (Editorial Grid only; Resource Library thumbnails are square). columns – 1 to 4, the most columns the Editorial Grid uses (it shows fewer on narrow screens). excerpt_length – 10 to 80 words.
show_sort, show_chips – true or false. The sort control and the active filter chips are off unless you turn them on here, in the block, or under Settings.

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.

延伸相關外掛

文章
Filter
Mastodon