Skip Navigation

[Resolved] Content Template not applying to new post type posts

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
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+00:00)

This topic contains 7 replies, has 2 voices.

Last updated by Nigel 1 year, 4 months ago.

Assisted by: Nigel.

Author
Posts
#2649123
content template.JPG
alchemy.JPG

I am trying to: apply a Content Template

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

I expected to see:
hidden link

Instead, I got:
Still shows post meta and does not show featured image, works on all other post types that were made several versions of Toolset ago. These new post types are not showing the correct content template even though it's applied.

#2649229

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Screenshot 2023-10-02 at 12.16.08.png
Screenshot 2023-10-02 at 12.12.51.png

Hi there

It looks from the front end as if both posts you linked to are using the same content template.

See the two screenshots which show the markup for the content area of the page (which is specifically what the Toolset content template replaces).

In both there are two fields-and-text blocks and then a group block.

What is it that makes you think the wrong template is being used?

#2649355

You can see the difference on the frontend in the two links I provided.

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

I expected to see:
hidden link

#2649357
theme settings.JPG

To expand it seems like the theme options are not applying correctly on the new post type even though they do on the older post types.

#2649637

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Sorry, you know your site much better than I do, and when I visit the links it's not obvious what differences you are seeing that are the problem.

If the template theme settings are not applying for just a particular post type, are there any settings within Astra itself relating to the post type?

Can you try making some changes to the selections for the theme settings in the Content Template, re-save them, and see if they take effect? Then try reverting them and saving again.

#2649853
wotlk feat img.JPG
cata post meta.JPG

The issue is the old ones show the featured image and hides the post meta correctly, the new ones do not.

I tested hiding the featured image in the content template Theme Options setting which worked to hide the featured image for the old post types, re-enabling it didn't do anything for the new post type but did show for the old post types still.

The theme is just Astra, there aren't any settings that would effect one but not the other. The featured image and post meta is controlled in the content template theme options.

#2649893

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Could I take a look at your site? I suspect I will need a copy locally to be able to step through the code execution on the newer posts to compare with it working on the older posts, in which case I can prepare the site copy myself, if you are agreeable.

Let me mark your next reply as private so that I can get log-in credentials from you—you may want to create a temporary admin user for me to use that you can later delete. And be sure to have a current backup of your site.

#2650335

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Screenshot 2023-10-05 at 08.49.39.png

Thanks for that.

I took a copy to investigate locally, and I could see that the Astra options (stored in the wp_options table) were missing options for the Cataclysm Guide post type.

I'm not sure if/when things have changed with Astra, but Astra itself has theme settings for individual custom post types, and these need to be set.

Go to the front end Customizer (from Appearance > Customize or Astra > Customize), and choose Custom Post Types and then the post type you want to customise.

For the single post options, click the little arrow shown in the screenshot. That expands to offer more options, including whether to display the featured image.

When I enabled that on my copy of your site the featured image then appeared on the front end for Cataclysm Guide posts.