WP Manifestindependent plugin directory
manifest / events / tre-courses

TRE Courses (ACF Block + CPT)

Courses block plugin (CPT + taxonomy + ACF + block) as an alternative to the Events Calendar

★ 0stars

Install

Download source zip No release zip yet

This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.

Install straight from GitHub with WP-CLI:

wp plugin install https://github.com/himeylo/tre-courses/archive/refs/heads/main.zip
No built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.

TRE Courses Block Plugin

Goal: display upcoming courses in 4 categories using an ACF block (Gutenberg). CPT: course Taxonomy: course_category Terms (slugs): instructor-certification, certified-instructor-courses, rider-licensing, licensed-rider-courses

ACF Fields on course:

  • organizer, external_url
  • occurrences (repeater):
    • occ_start_date (date)
    • occ_end_date (date)
    • occ_venue
    • occ_city
    • occ_state
    • occ_cost

ACF Block: TRE Courses List Block fields:

  • category_slug (select)
  • limit (number)
  • show_cost (true/false)
  • show_venue (true/false)
  • show_organizer (true/false)
  • cta_text (text)

Rules:

  • A course is "upcoming" if any occurrence end_date >= today.
  • Sorting: by earliest upcoming occurrence start date.
  • Hide past occurrences in the dates list.
  • Date display: "March 3–5, 2026" (full month name), cross-month/year handled.
  • Locations are per occurrence; display City, State and include a "(map)" link to the full address.
  • Do not hardcode colors; inherit theme.

Codex implementation rules (must follow)

  • ACF repeater: do NOT read raw postmeta arrays/serialized structures. Always use have_rows('occurrences', $post_id) + the_row() + get_sub_field().
  • Query performance: do not attempt complex SQL/meta_query against repeater fields. Fetch up to 100 posts max per category and then filter/sort in PHP.
  • No new dependencies: do not add Composer, npm, webpack, build pipelines, or new plugins unless specifically directed to do so