Bricks ACF Repeater Enhancer — v1.0.0 playground release
Open the live demoExtends native Bricks ACF Repeater loops. It does not register a competing query type or replace Bricks/ACF.
Requirements
WordPress, Bricks Builder with native ACF Repeater query support, ACF Pro, PHP 8.0+.
Installing
Upload bricks-acf-repeater-enhancer-v1.0.0.zip under Plugins → Add New → Upload Plugin, activate, edit a native ACF Repeater query loop on a Container/Block/Div/Section, and open Content → ACF Repeater Enhancer. Tick Enhance native ACF repeater query. Existing loops remain unchanged until enabled.
New functionality
– Source choices: native Bricks context; specific post ID; parent post; ACF Options Page; ACF user and term objects (IDs).
– Field override: specify field *key* (preferred) or name for non-native sources.
– Four optional filtering rules: combine with AND or OR. Supported operators: equals/not, contains/not, starts/ends, numeric/lexical comparison, empty/nonempty and membership lists. Group field paths support dot notation such as location.name. To combine two groups of rules with mixed nesting, use a developer filter or multiple loops; GUI supports one AND/OR group.
– Sort: original, reverse, natural text, numeric, date. Primary and secondary subfield paths with stable ties.
– Slice: offset and limit after filtering/sorting.
– Dynamic tags (experimental): , {nlar_row:FIELD}, {nlar_parent:FIELD}, {nlar_root:FIELD}, 7048, ACF Repeater Enhancer.
– Admin diagnostic shortcode: or to print recorded loop counts on the same request. Visible only to administrators. Rendering the shortcode *after* the loop is necessary.
– Compatibility: v0.1 nlarMatch legacy filter settings remain recognised; native ACF loop type is not replaced.
Important technical limitations
This is a playground release, not a production-certified Bricks integration. PHP syntax checks and standalone row-engine tests pass; actual Bricks/ACF builder testing requires your installation. Bricks is not installed in the build environment.
1. Bricks' native ACF query object-type identifier, how it stores per-element custom settings and the shape of native row objects must be confirmed in the playground. If a query is not of the acf_... or acf-... type, the plugin intentionally does not touch it.
2. Source overriding with get_field() changes the *rows returned*, but Bricks' own native ACF dynamic-tag resolution may still use a different source post or row index. Verify image, gallery, link, WYSIWYG and nested repeater fields before relying on source overrides. The {nlar_row:FIELD} tag gives explicit values for common text subfields but is not an all-field equivalent to Bricks' native provider.
3. Ancestor row tags depend on the hook ordering supplied by the installed Bricks version. Verify parent and root tags against a nested loop with different values for each parent.
4. Advanced AJAX pagination, automatic field discovery dropdowns, nested AND/OR groups, arbitrary ancestor depth, cross-post aggregation and Flexible Content layout rendering are not implemented. Native Bricks Results Filter remains available; avoid stacking identical rules unknowingly.
5. ACF field override resolution via acf_get_field() may require a field key; some fields with duplicated names are ambiguous. Automatic field detection from query type is best-effort.
6. Transformations load the native result set into memory. Large datasets need separate testing; the 100,000 cap bounds offsets/limits, not ACF source row count.
7. The plugin relies on Bricks' hooks; an upstream update may change undocumented details.
Recommended playground validation
1. Verify plugin OFF leaves all existing ACF loops untouched.
2. Enable for a known native ACF repeater: reverse, limit 2, then restore native order.
3. Filter a text field; test AND and OR combinations, numeric and empty values.
4. Test date, numeric, primary and secondary sorting with duplicate values.
5. Use different source posts with distinctly different repeater rows; compare builder and frontend.
6. Test an ACF repeater nested inside an outer Posts query and inside another ACF repeater, checking parent tags and native dynamic tags.
7. Test Options Page, user and term sources; inspect empty/restricted/invalid IDs.
8. Test repeater subfield images, links, galleries and WYSIWYG independently, particularly for source overrides.
9. Verify the code does not interfere with Grouped Query List or native Bricks Results Filter.
10. Review WordPress debug log, builder errors and frontend under logged-in and anonymous sessions.
Local verification
Run php tests/test-transform.php to exercise the pure query transformation engine.
Architecture
includes/class-enhancer.php registers extra element controls and hooks bricks/query/result without changing the native rendering flow. Row context is tracked via the before/after-loop and loop-object hooks. No frontend JS, remote dependencies or database tables.
Reproducible demo recipes
Use a dedicated ACF repeater containing name (text), score (number), date (date), status (text), note (text), location (Group with name), and children (nested repeater). Include duplicate scores, an empty note, a zero score, different dates and distinct child labels. Keep a baseline native loop with enhancement disabled beside each transformed result.
Example: Enhancer configuration · Observable result
Reverse: Primary sort: ACF reverse order · Last source row appears first
AND: status eq active; score gte 9; Match all · Only rows satisfying both remain
OR: score lt 5; name eq Eagle; Match any · Union of the two matches
Nested Group path: location.name eq North · Only North rows remain
Natural text: name, Text ascending · Natural, case-insensitive order
Stable secondary sort: score, Number ascending; name, Text ascending · Equal scores are ordered by name
Date order: date, Date ascending · Chronological output
Slice: Offset 1; limit 2 · Two rows after the first transformed row
Empty / membership: note empty; or status in active,pending · Empty-note or listed-status matches
Source override: Specific post + ID + explicit field key · Values originate from the selected record
Nested context: Distinct parent/root names · Row, parent and root tags resolve to the intended row
Filtering runs before sorting; offset/limit run last. Limit 0 means all remaining rows. Rule comparisons are case-insensitive for text. empty means null, empty string or empty array; zero and false are not empty. Numeric sort places nonnumeric values last ascending (first descending). Date sort uses PHP strtotime; invalid/empty dates sort as zero. Secondary sorting only applies when a sortable primary mode and primary field are selected, and primary values tie.
Sources and dynamic tags
Source IDs in the current implementation are numeric. Post, user and term modes each resolve the corresponding numeric ID; the options mode uses the shared option bucket. The control description mentions prefixed object IDs, but do not rely on that text: post:123, user_123 and term_123 are not parsed by the current source resolver. Use the source selector plus numeric ID.
The parent source uses the tracked query-frame post context, falling back to the current post. It does not automatically mean the WordPress page's post_parent. Validate it in the precise nesting used by your template.
Source overrides, filtering and reordering can separate native Bricks subfield context from the transformed row. Compare native {acf_*} output with {nlar_row:FIELD} explicitly for each field type. Never present correct row counts as proof that image/link/gallery/nested values belong to the right record.
Playground status
ACF Pro must be active before native repeater examples can run. ACF Free cannot provide repeater or gallery fields. Documentation and prepared configurations may exist before that dependency is available; label runnable and pending examples separately. Local transformation tests prove the pure row engine only.
Troubleshooting
– No effect: enable the enhancer on the element that actually carries the native ACF repeater loop; Posts/Terms queries are intentionally ignored.
– Source override empty: check the numeric source ID, object existence and repeater field key.
– Text correct but image/link wrong: compare the native ACF context with the explicit row tag; see source-context limitation above.
– Diagnostics invisible: log in as an administrator and place the debug shortcode after the loop on the same request.
– Two loops disagree unexpectedly: check native Results Filter and any other query-result hooks before stacking equivalent rules.
Live Playground examples — 23 October 2026
Demo: https://bricks-playground.co.uk/acf-repeater-enhancer-demo/
Guide: https://bricks-playground.co.uk/docs/acf-repeater-enhancer/
The live page contains 39 examples using native Bricks elements or loops and isolated WordPress/ACF fixtures. Browser evidence and the precise verification boundary are recorded in docs/verification/bricks-new-plugins-2026-10-23/VERIFICATION.md in the working repository. These examples do not certify production accessibility, scale or all-browser compatibility.