ACF 5.8 – Parse Gutenberg blocks and get ACF data outside of post

Hey guys !
I’ve been playing around with the latest ACF 5.8.0 Beta 4 and I’m kinda stuck right know with an idea I had.

My website has very “content heavy” pages using Gutenberg and ACF Blocks, and I’d like to let the end user navigate easily through that content. I’m using many ACF blocks that basically contain specific titles througout the post. My idea was to display a navigation menu on the right that gathers everyone of these titles (so that the user can click and jump to the section in the post).

How can I parse through the post, get those specific ACF blocks data, and display them as a list ?

I would also like to display this list outside of the loop (such as in a header menu etc…).

We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Cookie Policy. If you continue to use this site, you consent to our use of cookies.