[solved after moving to live site] How To use bricks template with acf cpt so all the custom posts are updated with updated template

Hello,

I have my first local bricks and I am running into a peculiar problem. I have a acf cpt: “services” and a bricks template that I thought would update all service posts when updated. But I cannot get it to do that.

How to get an updated template to update all the already made cpts with it?

Hi

What have you entered in the template conditions?

Cheers

Patric

1 Like


Yes. I think I did it. With header and footer no problem.

When I open a new service post, I do not see the template immediately shown though. Only the footer and header with empty page (instead of the service template).

I am definitley doing something wrong… here the setting in template service:

That looks ok… strange

1 Like

So it should work, right?

I think so. If you chose a post in the populate content setting of the template, is anything shown?

Could it be a cache problem like this one

I have to specific type the name of a service, than this one is shown and will work to populate the content.

But if I open a NEW service post, the template is not shown. But it should, right? I used to pick it through the template icon, but that is just a copy, I guess, not a dynamic link to it.

Wait. Are you talking about entering the post data in the backend or are you talking about showing the post data in the frontend ?

The usual setup in the backend is that you have a CPT with custom fields and when you create a new post for that CPT, the custom fields are shown if you have assigned these fields to the CPT in ACF.

Is that working?

This one I don’t understand what you mean with it

First: It is a local install. So no problem with caching, I can think of.

Then I have ACF fields for “services” and when I write a new service post, I fill the acf fields, than I click to edit with bricks – and expect to see the template pulled and populated with the acf fields – but there is nothing.

So I thought, I click the template icon in bricks (where you get for example frames templates) and took the template (service) from there and it populated nicely. (I guess the wrong way, as it will only carbon copy the template not link dynamically).

That was why I ask here for the right way. :slight_smile:

No, you have to enter the acf fields in the template yourself. That is not automatically shown.

The acf data is there, but you have to tell Bricks how and where it shall be shown.

That is what the Dynamic Data is for in the Bricks elements.

It is like you have to design how and where Bricks shall show your acf data.

1 Like

Template:
The acf fields are done like this in the template to be pulled as a dynamcially into the header, an accent header etcpp. And they show when poplated with a specific service post. That is working.

CPT Post:
In each service post, I fill the acf fields with data (like the header, accent header etcpp.). When ready, I click EDIT WITH BRICKS, to see the post rendered. And it does NOT show the template. It shows only the header/footer templates, that are nicely pulled in.

That is my problem. :slight_smile:

What exactly do you want to edit in Bricks when you click on the button?

If I understand you correctly, you are already entering the acf data in the standard WordPress / Gutenberg screen.

When you look at the custom posts in the frontend, are the acf fields shown that you defined in the custom template?

Maybe this is a good explanation of the process:

Thank you for your time and effort.

“What do you want to edit”
Well it is not working. The template is not pulled into the post. What is not to understand? It is not working here and it looks like I do it as it is supposed to be.

If I go into one of my custom posts, I see all the acf fields and I then fill out each field with the current data in the WordPress editor.

If I then click on Edit with Bricks, it takes me to the Bricks Editor but everything except the header & footer is empty.

This is not a bug, this is how it works.

If I now go to the frontend and click on that post, that post is shown in the correct Bricks template with all the data I filled out.

That’s why I don’t understand why you click on Edit with Bricks when you have already filled out the data „outside“ of the Bricks editor, being the WordPress editor.

Can you show us a screen shot of the frontend?

See this note in Blue:

Tip: While you could write your blog posts with Bricks, it’s best to create a Bricks template for your blog post layout, and write your blog posts in the WordPress editor as usual.

1 Like

Thank you.
I just migrated to a live site, and now it works finally after a while.
Amazing.

1 Like