Comprehensive Guide: For Setting Up Custom Fields in WordPress Posts via API
This guide will walk you through the process of creating a new WordPress post and populating custom fields in Pabbly Connect using:
CASE 2
Response received in Pabbly Connect for ACF
Dashboard View
Response received in Pabbly Connect for META
Note: When you select META as the Custom Field Parent, the Meta Field values will be visible only in the API output and not on the dashboard.
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
This guide will walk you through the process of creating a new WordPress post and populating custom fields in Pabbly Connect using:
- CASE 1: ACF (Advanced Custom Fields)
- CASE 2: META
CASE 1
Part 1: Setting up WordPress for Advanced Custom Fields or ACF
Step 1: Install and Activate the ACF Plugin
- Log in to your WordPress dashboard.
- Navigate to Plugins -> Add Plugin.
- In the search bar, type "Advanced Custom Fields" or "ACF".
- Choose the plugin of your choice and click Install Now.
- Once the installation is complete, click Activate.
- You will now see a new menu item called ACF in your dashboard.
Step 2: Create a Field Group and Fields
This is the most critical part for the posting through API. You will create a field group with a few simple fields to confirm the connection works.- Navigate to ACF -> Field Groups.
- Click Add New.
- Enter the Field Group Title: Name it something easy to recognize, like Test Field Group.
- Click + Add Field Group and Enter the values of following:
Choose the Field Type
Enter the value of Field Label
Enter the value of Field Name
Enter the Default Value if applicable. - Click Save Changes
.
Group Settings: Enabling REST API Access
After setting up your custom fields, you need to enable them for API access. To do this, follow these steps:
- After clicking Save Changes on your Field Group, scroll down the page to the Settings section.
- Within the Settings box, find and click on Group Settings to expand it.
- Locate the Show in REST API setting.
- Toggle the button to Enabled.
- Then Click on Save Changes
This action makes your entire Field Group and all of its custom fields accessible through the WordPress REST API, allowing your API tool to read and write data to them.
CASE 2
Part 2: Setting up WordPress for META
Step 1: Create the Custom Plugin
You will create a simple plugin to hold the code for your meta box.- On your computer, create a new folder and name it.
- Inside that folder, create a new PHP file and name it.
- Open you folder and paste the complete code into it.
Step 2: Upload and Activate the Plugin
- Navigate to Plugins -> Add Plugins.
- Click the Upload Plugin button.
- Choose the zip file and click Install Now.
- Click on Install Now.
- Click on Activate Plugin
Response received in Pabbly Connect for ACF
Dashboard View
Response received in Pabbly Connect for META
Note: When you select META as the Custom Field Parent, the Meta Field values will be visible only in the API output and not on the dashboard.
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Last edited: