Basic WP-query
As basic as it gets, for clarity's sake.
WP Query | Type: PHP
CPT to CPT Reverse Query
Reverse query from different post types associated via ACF relationship field.
ACF, CPT, WP Query | Type: PHP
Event Listing Ordered by Date
Basic events listing, ordered by date, past events disappearing.
ACF, WP Query, WP/CP | Type: PHP
Exclude Posts with a Particular Custom Field Value
You can exclude all posts that don’t have a particular custom field value. In this example, ‘events’ posts with event_type other than ‘Workshop’ will be displayed; [...]
WP Query | Type: PHP
Filter Custom Post Type by Custom Fields
Can be found on an Evo blog post with more explanation.
ACF, PHP, WP Query, WP/CP | Type: PHP
Filter Custom Post Type by Taxonomy
UPDATE: Moving to PHP8 from PHP7.4, there was a problem with the format of the original filter form throwing an error. I have not tested this [...]
PHP, WP Query, WP/CP | Type: PHP
Paging CPT Listing on Static Home Page
Paging a query on static page set as home page (clicks to /page/2 but continues to show original items)
WP Query | Type: PHP
Pre Get Posts
Set up query parameters for different CPT archives.
WP Query | Type: PHP
Show Only Posts with a Particular Custom Field Value
You can display only posts that include a particular custom field value. In this example, ‘events’ posts with event_type ‘Workshop’ will be displayed; other event types [...]
WP Query | Type: PHP
WordPress Meta Query (Basic Example)
Meta Queries compare multiple keys and values.
WP Query, WP/CP | Type: PHP






