How to Add Custom Fields With ACF
WordPress Tutorials & How-To (Advanced)
How to Add Custom Fields With ACF
ACF (Advanced Custom Fields) is one of the most powerful tools for creating custom content in WordPress. It lets you add additional fields to posts, pages, CPTs, products, and more. This advanced tutorial shows how to create custom fields, assign them to content types, and display them using Elementor or PHP.
1
What Is ACF?
A plugin that adds powerful custom fields to WordPress.
Advanced Custom Fields (ACF) allows you to add extra data fields to any part of your website.
Examples of custom fields:
- Price
- Ratings
- Client Name
- Project URL
- Gallery Images
- Download Links
- Additional description
ACF is essential for building dynamic websites, directories, portfolios, and custom templates.
2
ACF Free vs ACF Pro
Choose the right version for your website.
ACF Free Includes:
- Text
- Number
- Image
- Textarea
- File
- Checkbox
- Select
ACF Pro Includes Everything in Free +
- Repeater fields
- Flexible content fields
- Gallery field
- Clone field
- Dynamic relationships
- ACF Blocks for Gutenberg
For advanced websites, ACF Pro is highly recommended.
3
How to Install & Activate ACF
The first step to using custom fields.
Install ACF Free:
- Go to Plugins → Add New
- Search Advanced Custom Fields
- Install → Activate
Install ACF Pro:
- Download from ACF website
- Upload via Plugins → Add New → Upload Plugin
- Activate with license
4
How to Create Custom Fields (Step-by-Step)
Create a new field group for any post type.
Step 1 — Create a Field Group
- Go to ACF → Field Groups
- Click Add New
- Name it (Example: Service Details)
Step 2 — Add Fields
Click Add Field. Choose from:
- Text
- Number
- URL
- Textarea
- Select box
- Repeater (Pro)
- Gallery (Pro)
- WYSIWYG editor
- Image upload
Step 3 — Assign Location Rules
Tell ACF where the field should appear.
- Post Type = Services
- Post Type = Page
- Post Template = Custom Template
- User Role = Administrator
Example: Display only on the CPT “Projects”.
Step 4 — Publish
Your custom fields now appear on the selected edit screens.
5
How to Enter Data in Custom Fields
Easy, structured content management.
- Open any post or custom post type
- Your ACF fields will appear below the editor
- Enter the data such as:
- Price: ₹2999
- Client Name: John Doe
- Project URL: https://example.com
- Gallery images
- Save / Update
You’ve now added structured content using ACF.
6
How to Display ACF Fields in Elementor
The easiest visual method for dynamic fields.
Step 1 — Edit a Template with Elementor
Open a Single Post, Page, or CPT template.
Step 2 — Use Dynamic Tags
- Drag a widget (Text, Image, Button)
- Click on its Dynamic Tags icon
- Select ACF Field
- Choose the field you created
Examples:
- ACF Image → Display a gallery thumbnail
- ACF Text → Display price
- ACF URL → Link a button to project URL
- Repeater field → Use Elementor Loop Grid
Elementor + ACF is the best combination for dynamic websites.
7
How to Display ACF Fields in PHP (For Developers)
Use template files for maximum control.
Use the_field() or get_field() inside your theme template.
Example — Display a custom field “price”:
<h3>Price: ₹</h3>
Example — Display an ACF image:
<img src="" alt="" />
Using PHP gives you full control over theme customization.
8
Popular Use Cases for ACF
Perfect for dynamic, data-driven websites.
- Service pricing tables
- Portfolio project details
- Team member profiles
- Real estate listings
- Restaurant menu items
- Directory listings
- Product specifications
- Custom WooCommerce layouts
ACF makes any type of structured content possible.
9
Common ACF Issues & Fixes
Troubleshooting tips for advanced users.
1. ACF Fields Not Showing?
- Check location rules
- Ensure post type supports custom fields
- Enable REST API
2. Dynamic Tags Not Updating?
- Clear cache
- Regenerate Elementor CSS
- Ensure correct template assignment
3. Repeater Field Not Displaying?
Use Elementor Loop Builder or custom PHP loop.
4. Gallery Field Not Working?
Ensure your theme supports wp_get_attachment_image().
Need a Dynamic Website Powered by ACF?
All SiteCrafted premium websites include ACF integration, custom fields, dynamic templates, and Elementor-ready layouts—perfect for advanced business websites.









