Hi there,
I am using a content template for my posts
It looks like this: hidden link
The psycologists can create a new post from a form in frontend, the problem is, a sidebar is automatically added to the post and mess up my design. I edited the template files to remove the sidebar, but when new posts and pages are added, the theme automatically asigns them a sidebar, how can I avoid this?
Thanks
Lykke
Sidebars are something output by the theme, like a header, footer or post title/metadata.
Content Templates, in turn, replace the_content() function used by Themes to display the Post Body (or any other function a theme may use for it).
So basically you can neither alter, design or control any other aspect of the site, using Content Templates, unless the_content() (which is the post body).
However I suspect, you speak out of the Toolset Theme's integrations perspective, where such things become possible, if the Theme submits a certain file to Toolset, like the themes shown here do:
https://toolset.com/documentation/recommended-themes/
I suspect you use such an integrated Theme that offers the options to include(or else alter) sidebars and more aspects of the Themes if provided.
And there is a glitch with all those integrations when using Toolset Forms:
https://toolset.com/errata/the-selected-theme-options-in-a-content-template-or-layout-have-no-effect-when-the-post-is-created-by-a-toolset-form/
https://toolset.com/errata/the-full-width-option-from-divi-is-not-applied-to-posts-that-use-a-given-content-template-when-created-with-cred/
So that could be very well the issue you see on your end, however, I am not entirely sure as I don't know the precise theme you use.
Can you confirm from your end that you face either of the 2 above shared known problems?
I have to admin, I'm not sure exactly, I don't think the symtom descriptions covers it, but I could easily be wrong.
I was thinking, when the post is created, it's using the themes single-post.php and content-single.php, one of these must include the sidebar somehow, and it must be possible to change the template files for the custom content template, to not be able to include or display a sidebar?
Thanks again
Lykke
Yes, it's possible, with the mentioned setting (If it would be working) or, custom code.
Templates are hardcoded, we can replace the content, Divi had an option to also control the Title, which we integrated, but it's broken so now you cannot use that option with Divi on Custom Post Types because Divi does not allow manipulating Custom Post Types out of the box like that, and well, our integration in relation is broken.
Please let me know if once logged in and checked that Content Template you can see what I mentioned here:
https://toolset.com/forums/topic/automatically-asigned-sidebar-for-new-post-created-with-frontend-form/#post-1315363
I am pretty sure it's the issue.
To work around it you can only leave the design the Divi and focus only on the content, or create a child theme and add a new template for the post type using custom code, where you call only the_content() which can be replaced by Toolset Views.
You'd not be adding a title or other stuff to that template at all, similar to what you see here: hidden link
Please let me know if I can help further.