Skip Navigation

[Resolved] Overwrite single-{custom}.php theme template

This support ticket is created 3 years, 9 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: Africa/Casablanca (GMT+01:00)

This topic contains 1 reply, has 2 voices.

Last updated by Jamal 3 years, 9 months ago.

Assisted by: Jamal.

Author
Posts
#1993755

On talestavern.com, we have a custom post type created with Toolset : slabs.

Subscribers of the site can create those via a toolset template. When they're connected, or an administrator is connected, they can edit slabs, based on another content template. To add a "Edit" link in the template used for slabs, we add this url parameter at the end of the slab permalink :
?content-template-id=102

I'm working on my local on a new version of that single slab template. I'm coding it directly in the child theme now, so I have a file called single-slab.php. These Edit links now go to that same file instead of opening in the Toolset content template. Like if my file was overwriting the url parameter.

Is there a way to force render a post in a url-provided content template ?

#1994239

Hello and thank you for contacting the Toolset support.

Make sure that your single-slab.php file uses the the_content function from WordPress https://developer.wordpress.org/reference/functions/the_content/
Content templates replace the return of the_content template. Read more about it here https://toolset.com/documentation/programmer-reference/theme-support-for-content-templates/

Does it make sense? Otherwise, please share the single-slab.php file through a service such as pastebin.com, so I can check it further.