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?
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?
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)
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.
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.
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.