Skip Navigation

[Closed] CPT created from a Post Form does not use assigned content template

This support ticket is created 2 years, 5 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.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

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/Karachi (GMT+05:00)

This topic contains 7 replies, has 3 voices.

Last updated by Waqar 2 years, 5 months ago.

Assisted by: Waqar.

Author
Posts
#2220687
screen.jpg
screen2.jpg
screen1.jpg

I have a Post Form that I am using to let users create a post (Flypatterns CPT).
The form is set to create new content and to publish the post. (Screen1).

It does publish a post but when I try to view the new post it does not use the Content Template (Idvfly) that is set for that post type. (Screen)
Instead, it seems to be using an archive template. When I check in the post, the Content Template IS set to the correct (Screen2) template.
What am i doing wrong? WHy is the created post NOT using the correct Content Template?

#2221161

Nigel
Supporter

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

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

Is the front-end form a red herring? If you add a post in the back-end editor does it have the same problem (i.e. none of your posts with the content template assigned are using it on the front end)? Do any content templates work?

In which case it would suggest a potential compatibility issue with the theme (whereby the theme does not use the standard the_content function to output the post content, which is ordinarily required for Toolset templates to work).

To check that, can you first try switching theme to twentytwentyone and see if the content template is correctly used then?

#2221735

Hey Nigel,

I have imported a significant number of posts in the back-end and they are all using the content template seemingly successfully and I have significant CSS in the Content Template that does seem to work on the front end. I have read a number of tickets where the theme does not use the _content function correctly so I will try switching theme and report back. As an example...back end import (hidden link). Added with front end form (hidden link)

#2221875

Hey Nigel
Changed theme to twentytwentyone and same results. The post created with a form did not use the content template and was different to all back-end loaded posts. In fact, when i viewed the post the title was "Archive: <post title>". So for some reason it is using an archive template even though none is asigned to that CPT.

#2221951

Waqar
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi,

Thank you for sharing these details.

Can you please share temporary admin login details so that I can see how these posts and the content template are set up?

I'll also need your permission to download a clone/snapshot of the website, in case, it needs to be investigated on a different server.

Note: Your next reply will be private and it is recommended to make a complete backup copy, before sharing the access details.

regards,
Waqar

#2222797

Mistake

#2222803

Thanks Waqar. Here are the relevant details

CPT: FlyPatterns
Content template: IdvFly
Form:FlyEntry
Page with form: 2.AddNewFly

On home page "+" simple in sidebar launches that page

0000 and 1111 are posts created with that form that are assigned to IdvFly CT but do not use it. All others were imported and do correctly use that CT.

#2223851

Waqar
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Thank you for sharing these details.

I used the form on the page "2.AddNewFly" and create a post "test post form TS support" and it is is showing correctly with the content template "IdvFly".

On your website, I only see 1 post "0000" which is showing incorrectly and I suspect it is happening due to some overlapping/conflict of the slugs.

Can you please test the form again and see if you can reproduce the issue with any new posts?

The topic ‘[Closed] CPT created from a Post Form does not use assigned content template’ is closed to new replies.