[WordPress] 外掛分享: Advanced Query Loop

首頁外掛目錄 › Advanced Query Loop
WordPress 外掛 Advanced Query Loop 的封面圖片
5,000+
安裝啟用
★★★★
4.7/5 分(27 則評價)
22 天前
最後更新
25%
問題解決
WordPress 6.2+ PHP 7.4+ v4.4.0 上架:2022-12-19

內容簡介

此外掛引入了一個查詢循環區塊變化,讓使用者能夠透過查詢循環區塊進行更複雜的查詢,例如顯示文章數量和文章元數據等。

支援/問題

如需任何問題或回報問題,請使用支援論壇或官方存儲庫。

可用控制項
文章數量和偏移

設置要顯示的文章數量(最多10篇),選擇您是否要從第一篇或第100篇開始顯示!

文章元數據查詢

使用介面生成複雜的文章元數據查詢,基於meta_key,meta_value和compare選項創建查詢。結合多個查詢並確定它們是否合併結果(或者)或縮小範圍(並且)。

日期查詢

查詢在日期之前、之後或兩個日期之間的文章!

外掛標籤

開發者團隊

⬇ 下載最新版 (v4.4.0) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「Advanced Query Loop」→ 直接安裝(推薦)
📦 歷史版本下載

原文外掛簡介

Supercharge your queries without any code
Tired of the limitations of standard Query Loop blocks? Advanced Query Loop gives you the superpowers you need to create sophisticated, dynamic content queries that go far beyond the basics. Whether you’re building a portfolio, news site, or complex content hub, this plugin puts you in complete control of your content display.
What makes Advanced Query Loop special?

No coding required – Everything works through an intuitive visual interface
Powerful query building – Create complex queries that would normally require custom code
Flexible and extensible – Built with developers in mind, but accessible to everyone
Performance optimized – Smart caching and efficient queries keep your site fast

Support & Community
Need help? We’ve got you covered!

WordPress.org Support Forum: Get help here
GitHub Repository: Report issues & contribute

Powerful Features at Your Fingertips
🏷️ Advanced Taxonomy Queries
Build sophisticated taxonomy queries that let you filter content by multiple categories, tags, or custom taxonomies. Create complex relationships between different taxonomy terms to display exactly the content you want.
📝 Multiple Post Types
Don’t limit yourself to just posts! Query across multiple post types simultaneously. Perfect for portfolios, news sites, or any site that needs to display different types of content together.
🎯 Smart Post Inclusion
Take full control over which posts appear in your query:
* Manual selection: Choose specific posts by title or ID
* Child items only: Show only child posts of the current content
* Dynamic filtering: Combine multiple inclusion rules
🚫 Intelligent Post Exclusion
Keep your queries clean and relevant:
* Exclude current post: Automatically hide the post being viewed
* Exclude a list of posts: Curate a list of posts to exclude from the query
🔍 Advanced Post Meta Queries
Create powerful meta queries without touching code:
* Multiple conditions: Combine different meta fields and values
* Flexible comparisons: Use equals, not equals, greater than, less than, and more
* Logical operators: Combine queries with AND/OR logic
* ACF integration: Works seamlessly with Advanced Custom Fields
📅 Dynamic Date Queries
Time-based content has never been easier:
* Relative dates: Show content from last 1, 3, 6, or 12 months
* Before/after current: Display content relative to the current date
* Custom date ranges: Set specific start and end dates
* Multiple date conditions: Combine different date rules
📊 Flexible Sorting Options
Sort your content exactly how you want:
* Author: Sort by post author
* Date: Sort by publication date
* Last Modified: Sort by last update
* Title: Alphabetical sorting
* Meta Values: Sort by custom field values
* Random: Shuffle your content
* Menu Order: Use custom ordering
* Name: Sort by post slug
* Post ID: Sort by post ID
* Comment Count: Sort by engagement
* Included Posts: Sort by post inclusion order
⚡ Performance Optimization

Disable pagination: Reduce query overhead by turning off pagination when it is not needed
Enable caching: Store query results in a transient for one hour to reduce database load on subsequent page loads. The caching toggle is unavailable when the order is set to Random, and switching to Random order will clear any existing caching setting
Efficient queries: Optimized database queries for better performance

Customization & Extensibility
Filter Available Controls
Don’t need all the features? No problem! You can easily hide specific controls using the aql_allowed_controls filter:
add_filter(
'aql_allowed_controls',
function( $controls ) {
// Remove specific controls you don't need
$to_exclude = array( 'additional_post_types', 'taxonomy_query_builder' );
return array_filter( $controls, function( $control ) use ( $to_exclude ) {
return ! in_array( $control, $to_exclude, true );
} );
}
);

Available Control Identifiers

'additional_post_types' – Multiple post type selection
'taxonomy_query_builder' – Advanced taxonomy queries
'post_meta_query' – Meta field queries
'post_order' – Sorting options
'exclude_current_post' – Current post exclusion
'exclude_posts' – Exclude a curated list of posts
'include_posts' – Manual post inclusion
'child_items_only' – Child post filtering
'date_query_dynamic_range' – Date range queries
'date_query_relationship' – Date query logic
'pagination' – Pagination controls
'enable_caching' – Query result caching

Developer-Friendly
Advanced Query Loop is built with developers in mind:
* Extensible architecture: Add your own custom controls
* Well-documented hooks: Easy integration with your themes and plugins
* Clean code: Follows WordPress coding standards
* Comprehensive testing: Thoroughly tested for reliability
Getting Started

Install and activate the plugin
Add a Query Loop block to your page or post
Look for the “Advanced Query Loop” variation in the block inserter
Configure your query using the intuitive controls
Preview and publish your dynamic content!

Perfect For

Portfolio websites – Showcase work with sophisticated filtering
News and magazine sites – Display content by category, date, and more
E-commerce sites – Filter products by custom fields and taxonomies
Educational platforms – Organize content by course, level, or topic
Real estate sites – Filter properties by location, price, and features
Any site needing advanced content queries – The possibilities are endless!

延伸相關外掛

文章
Filter
Apply Filters
Mastodon