Skip Navigation

[Resolved] In front doesnt show my template

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

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

Supporter timezone: Asia/Ho_Chi_Minh (GMT+07:00)

This topic contains 4 replies, has 2 voices.

Last updated by Beda 5 years, 8 months ago.

Assisted by: Beda.

Author
Posts
#1204072

I am trying to: add a template for single.php for new type

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

I expected to see: the template i defined

Instead, I got: the theme single.php template of every post

#1204311

Content Templates or Template Layouts replace the_content() part of the template which is created by the Theme.
If your theme does not use the_content(), but another specified function to render the Post Body, you can add it to the Toolset following this doc:
https://toolset.com/documentation/user-guides/theme-support-for-content-templates/
This will only work for Content Templates, not Template Layouts

If your theme uses a not-supported custom filter or function then you cannot replace its content with the Templates of Toolset.
That is elaborated here:
https://toolset.com/home/compatibility-toolset-plugins-themes/ > Problem with themes that do not use the_content() to render Post Body Content

If your Theme is using a supported content function, you have assigned a Content Template or Template layout to the content as shown here (https://toolset.com/documentation/user-guides/view-templates/), then I will need the precise link to the templates, the posts, and access to the Website as Admin to see what is wrong.

#1204542

The output of debug is
Content Template debug:

Calling functions are Bunyad_Posts::the_content, WP_Hook::apply_filters

You can see it hidden link

#1204625

I just disabled filters on my custom type post and still doesnt show my template

function wphats_remove_plugin_filters() {
global $post;

if ( 'package' == $post->post_type ){
//remove_all_filters( 'the_content', 'bunyad-shortcodes' );
remove_all_filters( 'the_content' );
}
}

add_action( 'wp', 'wphats_remove_plugin_filters' );

#1204934

The content rendering function is apply_filters() which is not an allowed method to render the content, as the very Settings Screen in Toolset > Settings will explain.

Unfortunately, this means this theme is not ready to be used with any other content rendering plugin but only with its own content rendering function.
I am not sure who from Toolset Support suggested the function you shared - however that won't solve the problem.

The problem is that this theme does not follow WordPress standards to render the content.

You can solve that by creating a Child Theme, then in that Child Theme you can create templates for single posts and in it, call the_content() or any other custom, dedicated function to render the content (but not apply_filter() or any of the other forbidden functions as shown in the Toolset > Settings).
Here you can find more details about how to create a child theme:
https://developer.wordpress.org/themes/advanced-topics/child-themes/

Can I ask what theme you use?
I might then try to reach out to them, however, this should usually be done by the user in this case (you), since it's not that there is a BUG or compatibility issue to solve, the only required would be for the theme to use a WordPress standard function to render the content.
Note, this issue will happen with any other plugin that works on the_content() and that theme.