Skip Navigation

[Resolved] Content Template automatic assign to a CPT page

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

Problem:

Assign content templat to posts when import with "WP All Import" plugin.

Solution:

In each single post, there is a hidden custom field "_views_template", the field value is specific content template ID, you can try to setup that custom field as your specific content template ID when import.

Relevant Documentation:

This support ticket is created 4 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
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9: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/Hong_Kong (GMT+08:00)

This topic contains 2 replies, has 2 voices.

Last updated by antonioC-7 4 years, 8 months ago.

Assisted by: Luo Yang.

Author
Posts
#1556907

Hello,
I’m a Toolset user since a couple of years, and I used the combination Layouts, Types and Views for my site. Now I’m learning to work with Blocks. I’m updating my site to Blocks and I’ve found an issue that I would like you to check with you.
I use “WP All Import” plugin to update information on the site. Formerly, when importing the information, Toolset (I suppose) assigned templates to the imported CPT information automatically. For instance those two:
_wp_page_template {_wp_page_template[1]} --> default
_layouts_template {_layouts_template[1]} --> template-for-ficha-de-becas*
*This was the content template I created with Layouts to display the information. (You can see it working here: hidden link )

Today I’ve made an import as usual and I couldn’t see the CPT page info (It’s a different page than the previous example). It only appeared the header, footer and the Post Title.
Checking for the possible reason, I found that the “Content Template” option was set to “None” instead of the content template already assigned to this Custom Post Type (becas).
I selected the option manually and I could see the content normally.
How can I solve this issue to avoid having to change manually after the import?
Thanks,
Antonio

#1557073

Hello,

I assume you are going to use content template to design single post.

If it is, in each single post, there is a hidden custom field "_views_template", the field value is specific content template ID, for example:

You can try to setup that custom field as your specific content template ID when doing the import, and test again.

#1557749

Thanks very much Luo. The problem is fixed now.