Skip Navigation

[Resolved] Layouts is not working for views.

This thread is resolved. Here is a description of the problem and solution.

Problem:
Assigned layout not working with Enfold theme

Solution:
Enfold child theme do not use standard the_content() function to display the body part. If your theme is not using the_content() to display the Content of your Posts, neither Content Templates nor Layouts will work.

You can find proposed solution, in this case with the following replyl:
=> https://toolset.com/forums/topic/layouts-is-not-working-for-views/#post-630559

Relevant Documentation:

This support ticket is created 6 years, 8 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 2 replies, has 2 voices.

Last updated by simranjeetS-2 6 years, 8 months ago.

Assisted by: Minesh.

Author
Posts
#630358

I am trying to: have a layout for child posts - cred comments. I made layout also. but I dont know why it is not displaying.

Link to a page where the issue can be seen: hidden link

I expected to see: my custom layout

Instead, I got: something else.

#630559

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Well - I see you are using Enfold child theme and this theme do not use standard the_content() function to display the body part. If your theme is not using the_content() to display the Content of your Posts, neither Content Templates nor Layouts will work.

I switched to default 2017 theme and I see layouts is working fine for the same problem URL you shared.

I suggest you should create single-cred-comment.php PHP template for your "cred-comment" post type and use the_content() as you already did with single-lawyer.php and check - it will display the layout then.
=> hidden link

#630561

Thanks for this solution Minesh.