ACF and WooCommerce: custom product pages without sacrificing performance.
Advanced Custom Fields lets you enrich your WooCommerce products with structured data. But poorly implemented, it can slow your site down. Here's how to do both.
×50 SQL queries in a loop
The limitations of native WooCommerce fields.
WooCommerce offers product attributes and basic custom fields. For a simple catalog, that's enough. But when you need:
- Detailed spec sheets (dimensions, materials, certifications)
- Conditional content (show a block only for certain categories)
- Structured data for SEO (enriched schema.org Product)
- Extra galleries, PDF documents, embedded videos
...native fields won't cut it. ACF (Advanced Custom Fields) fills this gap with a clean admin interface and rich field types.
What ACF enables on WooCommerce.
Enriched product pages
Add custom tabs to the product page: technical specs, size guide, warranty terms. Each piece of data is a structured ACF field, not free text in the description.
Custom checkout
Add specific checkout fields: gift message, EU VAT number, preferred delivery date. Data is stored cleanly in the order.
Advanced variations
Go beyond standard variations (size/color): add per-variation fields with specific prices, images, and descriptions.
REST API
ACF exposes its fields in the WordPress REST API. This is essential for headless architectures: your custom data is accessible via JSON, ready to be consumed by an Astro, Next.js, or mobile app frontend.
SQL queries. That's what a get_field() in a loop generates on a catalog page with 50 products. Every poorly called custom field multiplies the load.
The meta query trap.
Every ACF field is stored in wp_postmeta. When you filter or sort products by a custom field, WordPress runs a meta query - a join between wp_posts and wp_postmeta that can become very slow on a large catalog.
Concrete example: Display all products where "organic_certification" is "yes", sorted by "harvest_date" - two nested meta queries. On 10,000 products, that can take 2-3 seconds without optimization.
The solutions:
- Indexing: add MySQL indexes on frequently filtered meta_keys
- Taxonomies over meta: for filter data (color, size, certification), a custom taxonomy is much more performant than a meta field
- Targeted caching: cache heavy query results via transients or Redis
The rule: ACF for display, taxonomies for filtering. If a field is used to filter or sort products, make it a taxonomy. If it's just displayed on the product page, make it an ACF field.
Implementing ACF right on WooCommerce.
-
Don't load ACF everywhere
ACF loads its scripts and styles in the admin. On the frontend, use
get_field()only on templates that need it. Noget_field()calls in global query loops. -
Use Local JSON
ACF can save field group configuration as JSON in the theme. Faster than reading config from the database on every admin load.
-
Prepare for ACF to Gutenberg migration
ACF is evolving toward Gutenberg blocks (ACF Blocks). For new projects, prefer ACF Blocks over classic field groups - more flexible and better integrated with the editor.
Rich product pages AND a fast site.
I implement ACF on your WooCommerce with performance best practices: indexing, caching, data architecture. Your products look great without your site paying the price.