Archived topic
Add custom filed to Page
5 replies · Started by Thushara on July 5, 2022
Hi there,
I want to add a sub heading below my page titles. I created a Block Layout to pull data dynamically. I added a custom field using ACF for sub heading to Pages. I want to know how to pull that field to GB Heading block dynamically.
https://www.dropbox.com/s/7goym9y31hl24az/adw.PNG?dl=0
Thanks
Thanks for the reply. But I do not see such an option.
You won't see that option in the element's editor, it's an option to activate WP's custom field on post/page editor.
As your custom field is created by ACF, there's no need to activate WP's custom field option, and because ACF is activated, the WP default custom field won't show, for more info: https://plugin-planet.com/fix-custom-fields-not-showing-wordpress/
Anyway, if the custom field is created and filled with a valid value, you should be able to enter the meta field name directly as the video shows.
If the value doesn't show on front end, make sure to enable the REST API for your ACF fields:
https://www.advancedcustomfields.com/resources/wp-rest-api-integration/
Nice. Thanks!
You are welcome :)