Skip to content

Backend Specific

This section provides a quick but comprehensive overview of how we build backends at Terra using WordPress, PHP, and Advanced Custom Fields (ACF). You’ll learn our approach to data modeling, content relationships, and AJAX endpoints — the core pillars of our backend workflow.


By the end of this section, you’ll understand:

  • ACF & Data Modeling - How we structure content using simple fields, Repeaters, and flexible data models.
  • Repeaters & Relationships - When to use each field type, how to loop through them correctly.
  • AJAX & Endpoints - How we expose backend data through WordPress AJAX endpoints and consume it from JavaScript.

At Terra, we follow strict backend conventions to ensure:

  • Consistency - All projects follow the same patterns for ACF usage, loops, and endpoints.
  • Maintainability - Backend logic is clean, predictable, and easy to extend.
  • Scalability - Data structures grow with the project without breaking the frontend.
  • Flexibility - The frontend relies on structured data, not rigid templates.

These aren’t arbitrary rules — they’re battle-tested practices that help us avoid technical debt and keep projects stable over time.


Read through each subsection in order:

  1. ACF Structure - Learn how we define field groups and model content
  2. Repeaters & Relationships - Understand how to handle dynamic content and related data
  3. AJAX & Endpoints - Discover how to expose backend data efficiently to the frontend
  4. Helpers & Common Functions - Learn our helpers and most common functions

Each section includes practical PHP and JavaScript examples you can reference when building new features.


Before diving into the details, here’s the essence of our backend approach:

ACF → Model clear, reusable, frontend-oriented data
Repeaters → Manage dynamic, ordered content from the admin
Relationships → Connect content without duplicating data
AJAX → Create secure, clear endpoints consumed by JS


Ready to continue? Let’s start with the foundation of our backend architecture: ACF structure.

→ Continue to ACF Structure

Knowledge Check

Test your understanding of this section

Loading questions...