the repo

By Stephen Walker

Looper For Etch

Choose you content See the query

Download plugin ↓View source
CSS Studio editor on the Bricks test site
Looper for Etch

What Looper does

Looper helps you select, filter, and order the content your visitors see. Create a list of recent articles, filter media by an Etch Collection, combine taxonomy and metadata conditions, or configure an archive template’s Main Query. The generated PHP stays visible as you work.

You still design the repeated content in Etch with your own elements, components, and dynamic expressions. Looper builds the query and helps you discover its data. It adds no query processing or assets for ordinary visitors.

Choose what repeats

Query posts and public custom post types, Media Library attachments, taxonomy terms, or WordPress users. Main Query supports archive and search templates where the current URL supplies the context. Attachment queries include MIME type, parent post, and attachment-taxonomy filters such as Etch Collections.

Start with count, sorting, status, and offset. Add taxonomy rules using term-name lookup, compare stored metadata, or choose date boundaries with calendar controls. More provides registered Meta Box relationship choices when that extension is available. Advanced includes additional content-selection, author, search, hierarchy, and pagination settings for the selected source.

Nested AND/OR groups express conditions such as articles in either of two categories that also have a rating above a threshold. Friendly labels include the real WordPress argument names in tooltips, and reference links explain the underlying options.

Mark a supported scalar option as an Argument to reuse a definition with different values. For example, $count ?? 6 provides a default of six records while allowing another count when the loop is used. Lists use fixed values.

Copy first. Save when you are ready.

Copy/paste is the default workflow. Copy for Etch copies only the entries inside $query_args = [ ... ];. It omits the PHP opening tag, assignment, and outer brackets while preserving nested arrays. Paste those entries inside Etch’s existing query-arguments array in Loop Manager, then save in Etch when ready. Manual paste does not require a page reload.

You can load a supported existing query, adjust its settings, and copy the revised arguments. Loading changes only Looper’s form. Name and key fields stay hidden in copy-only mode because they are not needed for copying arguments.

Optional direct Etch actions

Enable direct Etch actions in the Settings popover to reveal name/key fields and controls to save a query definition, insert a starter loop element, or apply a query to the exact selected loop element. These controls are off by default. Applying a query preserves the element’s content, variable names, and argument overrides.

Keeping an existing key updates that definition wherever it is referenced; changing the key creates another definition. New keys use camelCase. Most direct actions update the editor without reloading, and you use Etch Save to persist them.

Etch’s public add/update API rejects some valid query shapes. Looper then offers Save changes and reload or Cancel. Confirming saves all current editor changes and the native query, then reloads to refresh Etch’s query list. Insert/apply actions continue afterward for review. Cancel leaves the form intact. Use Copy for Etch instead to avoid the automatic save and reload.

Inspect a sample and copy dynamic keys

Run preview to inspect one matching record, using the argument defaults in the form. Expand its fields and copy an expression such as {item.title}. If your loop uses another alias, replace item with that alias.

Object controls also provide .keys() and .values() expressions, such as {item.meta.keys()}. These native Etch modifiers return arrays of field names or corresponding values for use in Etch.

The sample is not a complete database schema. It reflects the matching record, active field integrations, and Etch’s dynamic-data filters, including your own cleanup filters. Main Query results must be checked in the matching archive or search context.

Optional suggestions in the HTML editor

Enable HTML loop field suggestions in Settings. Inside a loop aliased article, typing {article. lists available sample fields. Object choices drill down into nested data, and nested loops use the aliases available at that location. Objects also offer keys() and values().

Use arrow keys to navigate, Enter to insert, and Escape to dismiss. Both Settings preferences belong to your user on the current site and take effect without saving or reloading the document. They are off by default.

Autocomplete is experimental and currently limited to the HTML editor. It uses one sample, so missing fields may not appear. Required arguments must be available, and Main Query suggestions are not supported yet. Looper steps aside when a native or Etch Enhancer completion menu is visible. You can disable suggestions independently of the query builder.

Get started

  1. Install the release ZIP, activate Looper, and open its button in Etch’s left toolbar.
  2. Choose a source and content type, or load an existing supported query.
  3. Configure the options and filters, inspect the PHP, and run a sample preview.
  4. Use Copy for Etch, paste inside the existing query-arguments array, and save in Etch when ready.

Open Settings for optional HTML suggestions or direct Etch actions. Other tools in Etch’s left toolbar remain available, and selecting one closes Looper.

Good to know

Do I need to keep Looper active?

Saved queries are native Etch definitions and continue working if you deactivate or uninstall Looper. Your content, layouts, queries, and inserted native expressions stay in place. You lose Looper’s builder, sample preview, dynamic-key copying tools, and optional autocomplete.

Etch and any plugins that supply fields, galleries, or relationships still require their own features. When upgrading older Looper versions, open WordPress admin or Etch once with version 0.9.0 or later active to convert older compatibility definitions. Looper keeps a backup; resolve any migration warning before removing it.

Can it edit every Etch loop?

The query builder loads supported WordPress definitions. JSON/data-array loops, custom PHP callbacks, and queries returning only IDs or counts remain outside the visual query builder. Unsupported definitions are not silently rewritten.

What about ACF, ACPT, and Meta Box?

Meta filters work with stored keys and values, and the sample shows data exposed by Etch and its integrations. Each provider has its own storage and relationship behavior. The registered relationship-ID chooser uses Meta Box Relationships; it doesn’t convert ACF or ACPT relationships into Meta Box queries.

Does it work across a multisite network?

Content, saved queries, and preferences use the current site. This release excludes cross-site queries and a network-wide query library. A full multisite/Etch compatibility matrix remains pending.

Requirements and updates

Requires WordPress 7.1+, PHP 8.3+, and Etch with its public Loop API. Tested with Etch 1.7.1. Access requires administrator permissions or manage_options; user previews additionally require list_users. You need field, gallery, and relationship providers only for features that use them.

Stable GitHub releases appear in the normal WordPress plugin-update interface. Automatic updates remain your choice, and installed sites need no GitHub token. Download the asset named looper-for-etch.zip; GitHub’s separate source archives are for development.

Resources

RELEASE NOTES

Built to keep improving.

Version 0.11.0Simple WP Grid Builder and FacetWP query controls.

Changed

  • Load and preserve existing facet arguments in post and Main Query definitions.

Added

  • WP Grid Builder toggle and selector field under More, generating the native wp_grid_builder query argument.
  • FacetWP checkbox under More, generating the native facetwp query argument.
  • Setup reminders and links for facet wrapper classes and shortcodes.
Version 0.10.0Optional loop field suggestions in the Etch HTML editor.

Changed

  • Remove the introductory banner so the form starts with the existing-loop chooser.
  • Make copy/paste the default and place direct save/update, insert, and apply actions behind a separate off-by-default setting.
  • Place Loop source and Content type side by side, stacking only in narrow form panels.
  • Hide name/key fields in copy-only mode and place 16px copy guidance below the code output.
  • Rewrite the product overview and getting-started guidance for the copy-first workflow, optional settings, autocomplete limits, and native query behavior.

Added

  • Experimental HTML editor suggestions based on a matching loop sample, including nested aliases, object keys, and keys()/values() modifiers.
  • A per-user, per-site preference in an anchored Settings popover. Suggestions are off by default and can be disabled without reloading.
  • Copyable keys()/values() expressions for objects in the sample preview.
Version 0.9.0Save native Etch queries that continue working with Looper deactivated.

Changed

  • Save all query types as native Etch arguments; remove encoded query writing and visitor-time decoding hooks.
  • Use Etch’s editor API without reloading where it preserves the native query. Otherwise offer Save changes and reload or Cancel before saving all editor changes and refreshing. Insert/apply actions resume for review after a confirmed reload.
  • Place More after Advanced in the main tabs.
  • Copy for Etch copies only the entries inside the query_args array, preserving nested arrays. Explain that manual paste into Etch does not require reloading.

Added

  • Automatically migrate older and encoded definitions during an administrator visit, keeping a site-specific backup and preserving query IDs, scope, arguments and other saved properties.
  • Protect native saves with authenticated permissions, expected-definition checks, atomic conflict detection and readback.
  • Document migration, deactivation behavior and successful native rendering tests.
Version 0.8.1Added the public user overview and a validated, machine-readable release changelog.

Features

  • Add an Etch-focused overview, usage steps, compatibility notes, and official resource links for the product page.
  • Publish changelog.json in the repository, installable package, and release assets.
  • Generate GitHub release notes from the matching JSON entry and block releases when version metadata or changelog entries do not match.

Features

  • Point the plugin information link to its public Uplink product page.
  • Document the successful native WordPress update and remaining multisite and accessibility verification limits.
Version 0.8.0Initial public release of Looper for Etch with focused query controls and native WordPress updates.

Features

  • Build post, attachment, taxonomy-term, user, and archive/search Main Query loops.
  • Combine taxonomy, meta, and date filters with nested AND/OR groups, optional scalar arguments, and live PHP output.
  • Search taxonomy terms by name and inspect one sample record with copyable Etch dynamic keys.
  • Load supported existing queries, update their definitions, insert loop elements, or apply a definition to the selected loop.
  • Add stable GitHub release discovery through the WordPress Plugins/Updates interface with compatibility metadata and SHA-256 package checks.

Features

  • Keep Advanced focused on content selection, filtering, ordering, and pagination; remove execution and return-format controls.
  • Move Ignore sticky promotion to Query options, widen labels, and remove Fixed value labels.
  • Keep the native Etch left toolbar available and close Looper when another toolbar tool is chosen.
  • Harden preview permissions, nonce handling, query validation, and metadata discovery; add query, editor, accessibility, and updater tests.

MORE FROM THE TOOLKIT

All plugins

ACSS for Meta Box

Use ACSS. Power of Meta Box

CSS Studio for Bricks

Write CSS. See the change.

Uplink Hours & Greetings

Show greetings, opening countdowns, and dates from a reusable seven-day business schedule in blocks, Bricks, Etch, and shortcodes.