Adding a Label to the Main Editor for Custom Post Types»
When a CPT relies on a lot of custom fields via ACF, the unlabeled main editor can be confusing (“What’s this for?”). This code goes in the theme’s functions file,…
ACF, CPT, Custom Admin, PHP | Type: PHP
Common WP functions converted to variables»
Sometimes functions are easier to use in conditional statements if converted to variables.
ACF, PHP, WP/CP | Type: PHP
Conditional Based on Field Value»
Conditional based on values for single-value fields (radio buttons, select, etc).
ACF, PHP | Type: PHP
CPT to CPT Reverse Query»
Reverse query from different post types associated via ACF relationship field.
ACF, CPT, WP Query | Type: PHP
Display Dates if Start and End Dates Same Month»
Handy snippet for displaying event dates when events can stretch over multiple days.
ACF, Date/Time, PHP | Type: PHP
Event Listing Ordered by Date»
Basic events listing, ordered by date, past events disappearing.
ACF, WP Query, WP/CP | 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
Query Posts with ACF Values (Basic)»
Displaying posts that include a particular value for an ACF field (meta_key).
ACF | Type: PHP
Random order with ACF Repeater field»
Repeatable fields can be stored in an array using PHP, and using the PHP shuffle() function, we can shuffle the array elements.
ACF, PHP | Type: PHP
Saving ACF Options Field results in 404»
Temporarily disable ModSecurity (cPanel) and save the field. Once the option field is saved, you should re-enable ModSecurity!!!
ACF | Type: PHP