Skip to content

colorful-tones/acf-recipes

Repository files navigation

ACF Recipes

Final demo site 👉 acfrecipes.wpengine.com

💥 Slides for this presentation 💥

(This presentation was also created as a CPT and with Pattern Manager 🏎)

Description

A demonstration of using Advanced Custom Fields (ACF) to:

  1. Create a custom post type: Recipe
  2. Create a custom taxonomy: Recipe Types (e.g. breakfast, lunch, dinner)
  3. Create custom fields group: Cook & Prep Times
  4. Create a custom ACF Block: Cook & Prep Times that utilizes the custom fields and is available for the Recipe custom post type
  5. Create custom block patterns using WP Engine's Pattern Manager
    • Assign the block patterns to the Recipe post type
    • Make it available in the Recipe new post modal for editors
    • Register a custom block pattern category for Recipes
  6. Set a custom load & save point for ACF JSON. So we can version control our ACF generated CPT, taxonomy, and field groups directly in our custom plugin: plugins/acf-cooking-recipes/acf-json

Includes:

The root of this repo represents the wp-content/ directory of your WordPress install.

All of the content used to populate this learning resource site was sourced from SimplyRecipes.com

Requirements

  1. ACF PRO 6.1.0-alpha1 – for ACF stuff.

Optional

  1. Pattern Manager 0.1.3 – if you want to create and maintain further patterns, but not necessary if you do not.
  2. WordPress Beta Tester 3.2.9 – if you want to run the latest WP 6.2 RC2, which was used in the demo, but WP 6.1 will likely work just fine.
  3. Gutena Newsletter 1.1.4 – for newsletter block in footer template part, but you can remove the block and do not need it (your preference).

Resources

Changelog

  • March 16, 2023
    • Fixed misspelling of demo site
    • Add 'Requirements' section in README
    • Add lazyrecipes.WordPress.2023-03-16.xml WordPress export of Recipes custom post type
  • March 15, 2023 – initial push of repo with ACF Cooking Recipes plugin and Frost theme