Skip Navigation

[Resolved] Layout of custom post doesn’t appear on frontend

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

Problem:

The issue here is that the customer had a custom field that they were displaying on the frontend and whenever this field is empty there would be an error thrown on that particular post.

Solution:

In this case it seems that the field got corrupted and the recommendation was to completely remove and delete that field and recreate it in Types.

This support ticket is created 6 years, 9 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
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 19 replies, has 2 voices.

Last updated by sinisaB 6 years, 9 months ago.

Assisted by: Shane.

Author
Posts
#620725

Hi Shane!

Where to paste that code?

This is some kind of conditional patch, but I want to know why this layout won't work because that particular custom field...
This is bug and this solution is just a bypass...

#620734

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Sinisa,

I'm not 100% sure why this is being caused especially with just this field.

Would you mind if I took a duplicator package from your website for further testing.

Thanks,
Shane

#620740

Hi Shane!
It works!
I see now, you put code conditional output in Layout of "Geo-objave"
It works like this... It is enough...

Thanks for solution and effort!

P.S. Please let me know if you find what causes problem.

#620743

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Sinisa,

Yes I added the conditional to the layout for this CPT.

So if the field is empty that section won't show up. Alternatively you can wrap the conditional around just the Types field.

Thanks,
Shane

#620746

Ok thank you for effort and solution...

All the best!

Regards!