Article w/ Description
This article is editorial content and it has a description

Hi,
is it possible to get a data from registering block field (5.8-4beta) on any page?
For example:
- I’ve created Block “Contact” with fields email, phone, address
- Create page template “Contact page” and add block “Contact” and fill fields.
- I would like to add exactly the same data to the footer (on all pages)
Is there any option to use get_field() function and retrieve data from “Contact page”, from first block “Contact”.
I understand I can do that by get block ID.
get_field('contact_block', 'block_5c8b98f36c5c7');
But if someone remove this block and add again the same block type that my code won’t work.
Is it any way to get block ID based on page ID? (Get first block from Contact page).
Authors
Comments, questions and tips
Overall rating

Download RT App today!
summer
Immediate’s iconic brands reach 21m people every month – that’s more than a third of the UK’s adults – through its world-class magazines, innovative digital products and exciting live eventsImmediate’s iconic brands reach 21m people every month – that’s more than a third of the UK’s adults – through its world-class magazines, innovative digital products and exciting live eventsImmediate’s iconic brands reach 21m people every month – that’s more than a third of the UK’s adults – through its world-class magazines, innovative digital products and exciting live events