Layouts section

I am trying to get my head around Layouts.

In Layouts I have create a template and assigned it to a Single Case Study (CPT) and works fine.

Then I created another template under Layouts and assigned it to Archive Case Study (CPT)

This is the template for the archive:

<Loop type=case_studies orderby=date order=desc>
  <Field title />
  <Field content />
</Loop>

It shows the titles, but not the contents from the other single layout template. Am I supposed to be referencing the content in another way ?

Thanks

Hi!

Which theme are you using? If I remember correctly, L&L is only compatible with a few themes (Astra and Kadence, maybe?) when using the Layout feature.

Just a thought: It might be that you are seeing the title because of your theme settings and not because Tangible is working.

EDIT: Woops! I just realized you had two different post types and it was already working on the other one.
It seems you are trying apply the layout to an archive page. In that case, you cannot use <Field content />, since that type of page does not have a content field similar to a post.

Have a look here

1 Like

You have to reference your other template with the

<Template />

tag. Just referencing the content does not work, as the template is not part of the content field.

2 Likes

Thanks Ralf - that worked.

<Loop type=case_studies orderby=date order=desc>
  <Field title />
  <Template id=6116 />
</Loop>

Using the id worked, but using the name of the template did not for some reason

<Loop type=case_studies orderby=date order=desc>
  <Field title />
  <Template name=case-study-loop />
</Loop>