Site logo

Archived topic

ACF & Headline block

7 replies · Started by Paul on January 25, 2022

Viewing posts 1–8 of 8

Hi,

Using Post Types Unlimited I've created a CPT called 'Events'. In turn I've used ACF to add 3 fields - event_title, event_date, event_link

When I create a content template the headline block fails to display any of those fields. If I instead select a query loop, and select the Events post type, the post meta shows in the editor. Unfortunately, the query loop is too restrictive in terms of front-end layout.

Can you advise why the headline block fails to find the same fields the query loop is able to?

Thanks,
Paul.

Can you advise why the headline block fails to find the same fields the query loop is able to?

Do you mean the meta name doesn't show in the list?

If so, that's normal, GB dynamic elements won't show custom field in the dropdown list.

Although if you choose post meta as dynamic link, you can enter the meta field name directly.

Hi Ying,

Yeah in this instance I've entered the meta field name directly as I normally do. I've done this earlier today to show another custom field using the same method and that works fine. I try any of the 3 event fields created above and nothing is returned. Yet, the query loop does pull the fields.

Thanks,
Paul.

That's weird. So only for these 3 fields?

Any chance you can provide admin access to your site and point us to where we should be looking at?

Please use the private info field to enter this info. Thanks!

Hi Ying,

Admin account is below.

ACF fields are pretty basic, post type is Events, and the front-end page should be Events.
Element is 'Events Content Template'.

Thanks,
Paul.

I logged in, but I don't quite understand the logic.

The Block element - content template's location is set to a static page - Events, this setting won't pull any info as the page doesn't have the event_titlepost meta.

I think you misunderstood how the dynamic options work, it's different from the query loop block ( we're trying to make our own query loop block, but it's not ready yet).

In your case, you'll need to activate archives for Events post type, then select the events archive as location instead of a static page.

Here's the documentation of block element -content template, the video should help to understand how it works: https://docs.generatepress.com/article/block-element-content-template/

I see, I have that working now using the post type archive instead. I'll keep an eye out for any updates.

Thanks for your help,
Paul.

Just let me know if you run into any issue or anything unclear :)

This archived topic is closed to new replies.