Skip Navigation

[Resolved] Theme template override not working

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

This topic contains 1 reply, has 2 voices.

Last updated by Waqar 1 year, 1 month ago.

Assisted by: Waqar.

Author
Posts
#2656013

Hello!

Using Jnews theme and created a CPT Products.
Jnews theme is using wp-content/themes/jnews/fragment/post/single-post-3.php
Created: jnews-child-1/fragment/post/single-post-3-product.php

But the template override isn't working for CPT Products.

#2656097

Hi,

Thank you for contacting us and I'd be happy to assist.

As per the standard WordPress template hierarchy, you can place a file named 'single-{post-type}.php' (replacing {post-type} with the target post type's slug) in the active child theme's folder and it should work.
( ref: https://developer.wordpress.org/themes/basics/template-hierarchy/#single-post )

Some themes may use their own template structure. In those cases, they do provide comments or notes at the start of the template files on how to override them through a child theme.

In case it still doesn't work, you can consult the JNews theme's official support, for further information.

regards,
Waqar

#2659761

Thank you, Jnews support were able to fix the template. All working now.