Bottom Line: You can display specific Advanced Custom Fields in Elementor using JetEngine’s Query Builder or Meta Boxes approach. Both methods allow precise control over which ACF data appears on your frontend, with Query Builder being ideal for filtering posts by field values, while Meta Boxes offer greater flexibility across multiple content types.
Creating dynamic websites with WordPress often requires displaying specific custom field data rather than all available content. Whether you’re building a product catalog, portfolio, or directory site, the ability to filter and display targeted ACF fields through Elementor can transform your site from static to dynamic. This comprehensive guide covers both basic and advanced techniques for integrating ACF with JetEngine and Elementor.
Prerequisites and Requirements
Before implementing these techniques, ensure you have the following plugins installed and activated:
- Advanced Custom Fields (ACF) – Free or Pro version
- Elementor Pro – Required for dynamic content features
- JetEngine – Crocoblock’s dynamic content plugin
Understanding the relationship between these tools is crucial: ACF creates and manages your custom fields, JetEngine provides the querying and filtering capabilities, and Elementor handles the frontend display.
Method 1: Using JetEngine Query Builder (Recommended)
The Query Builder approach offers the most control and performance optimization for displaying filtered ACF data.
Step 1: Set Up Your ACF Field Group
- Create or Edit ACF Field Group
- Navigate to ACF > Field Groups in your WordPress dashboard
- Create a new field group or edit an existing one (example: “Product Categories”)
- Add fields with clear, consistent naming conventions for easier querying
- Configure Field Settings for Optimal Performance:
- Set field type to Select or Checkbox for filterable options
- Use consistent value formats (lowercase, no spaces for better query performance)
- Enable “Required” for critical filtering fields
Step 2: Build Advanced Query with JetEngine
- Access JetEngine Query Builder
- Go to JetEngine > Query Builder
- Click Add New to create a custom query
- Name your query descriptively (example: “Yellow Products Filter”)
- Configure Basic Query Parameters:
- Query Type: Select “Posts”
- Post Type: Choose your target post type
- Post Status: Set to “Published”
- Posts Per Page: Set appropriate limit for performance
- Set Up Meta Query for Precise Filtering:
- Navigate to the Meta Query section
- Meta Key: Enter your ACF field name (example: “color_type”)
- Comparison Operator: Choose based on your needs:
- LIKE – For partial matches
- = – For exact matches
- IN – For multiple values
- Value: Enter the specific field value (example: “yellow”)
- Type: Set to “CHAR” for text values, “NUMERIC” for numbers
Pro Tip: For complex filtering, you can add multiple meta queries and set the relation to “AND” or “OR” depending on your requirements.
Step 3: Connect Query to Elementor with Advanced Settings
- Create Dynamic Listing Template:
- Go to JetEngine > Listings
- Create a new listing template for your filtered content
- Design your layout using JetEngine’s Dynamic Field widgets
- Configure Listing Grid in Elementor:
- Add the Listing Grid widget to your page
- Select your custom listing template
- Enable Use Custom Query toggle
- Choose your JetEngine query from the dropdown
- Optimize Display Settings:
- Set appropriate Columns for responsive design
- Choose Masonry or Grid layout based on content
- Configure pagination if needed
Method 2: Using JetEngine Meta Boxes (Advanced Approach)
Meta Boxes offer greater flexibility when you need custom fields that work across multiple content types or require specific visibility conditions.
When to Use Meta Boxes vs Direct Post Fields
Meta Boxes are ideal for:
- Fields needed across multiple post types
- User profile custom fields
- WooCommerce product data customization
- Complex conditional logic based on user roles
Direct Post Fields work better for:
- Single post type specific fields
- Simple, straightforward field structures
- When using Custom Meta Storage for performance
Advanced Query Techniques
Complex Meta Queries
For more sophisticated filtering, you can combine multiple meta queries:
- Multiple Field Filtering: Filter by color AND price range
- Date Range Queries: Show events within specific timeframes
- Numeric Comparisons: Display products above certain ratings
Dynamic Query Variables
JetEngine supports dynamic values in queries using macros:
- %current_user_id% – Show content related to logged-in user
- %current_post_id% – Display related posts
- %url_var% – Use URL parameters for filtering
Performance Optimization Tips
Database Optimization
- Limit Query Results: Always set appropriate “Posts Per Page” limits
- Use Proper Data Types: Set meta query type to “NUMERIC” for numbers, “DATE” for dates
- Cache Strategies: Implement caching for frequently accessed queries
- Custom Meta Storage: For high-volume sites, consider JetEngine’s custom table feature
Frontend Performance
- Lazy Loading: Enable lazy loading for image-heavy listings
- Pagination: Use pagination instead of loading all results
- Optimized Templates: Keep listing templates lightweight
Troubleshooting Common Issues
Fields Not Displaying
- Verify ACF field names match exactly in JetEngine queries
- Check post type assignments in ACF field groups
- Ensure posts have the required field values populated
Query Not Filtering Correctly
- Double-check meta key names (case-sensitive)
- Verify comparison operators (use LIKE for partial matches)
- Test with simple values before complex filtering
Performance Issues
- Reduce the number of posts per page
- Simplify complex meta queries
- Consider database indexing for frequently queried fields
Best Practices and Pro Tips
- Consistent Naming: Use clear, consistent field names across your site
- Test Thoroughly: Always test queries with different data scenarios
- Document Your Setup: Keep records of field names and query configurations
- Plan for Scale: Consider future growth when designing field structures
- Use Staging: Test complex queries on staging environments first
Frequently Asked Questions
Can I filter by multiple ACF fields simultaneously?
Yes, JetEngine supports multiple meta queries. Add additional meta query conditions and set the relation to “AND” for items that must match all conditions, or “OR” for items that match any condition.
How do I display ACF repeater fields with JetEngine?
Use JetEngine’s Listing Grid widget with a custom listing template. In the template, add Dynamic Field widgets and select your repeater field. JetEngine automatically handles the loop through repeater values.
What’s the difference between JetEngine and ACF Pro for displaying fields?
ACF Pro provides basic Elementor integration for individual field display. JetEngine offers advanced querying, filtering, dynamic content, and complex listing capabilities that ACF Pro cannot match.
Can I use dynamic values in my queries?
Absolutely. JetEngine supports macros like %current_user_id%, %current_post_id%, and URL variables. This enables personalized content and dynamic filtering based on context.
Conclusion
Mastering the integration between ACF, JetEngine, and Elementor opens up unlimited possibilities for creating dynamic, data-driven WordPress websites. Whether you choose the Query Builder approach for performance or Meta Boxes for flexibility, the key is understanding your specific use case and implementing the most appropriate solution.
Remember to prioritize performance optimization, test thoroughly, and maintain consistent naming conventions. With these techniques, you can transform static websites into dynamic, engaging experiences that automatically adapt to your content changes.
Ready to take your WordPress development to the next level? Scope Design specializes in creating powerful, custom WordPress solutions that leverage the full potential of ACF, JetEngine, and Elementor. Our expert team can help you build dynamic websites that not only look great but perform exceptionally across all devices and use cases.