Identify When A Post/Page/CustomPostType has template set to 'None' #137
streetsahead
started this conversation in
Coding (HTML, PHP, CSS, JS)
Replies: 1 comment
-
After a little more digging I found the following code returns the template ID.
if that value comes back as -1 then 'None' is selected. Cheers |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey Everyone,
I'm having some issues after importing a custom set of templates I've created on a test site.
Sometimes after migrating the new templates in, the 'Where does this template apply' isn't always honoured.
Sometimes I'll find a page or post that 'should' match the requirements of a particular template, but it's set to 'None'.
So my ask is, is there a way I can print the name of the template currently in use for a given post id?
Then I can simply loop through the list of posts and confirm the correct templates are in use.
Thanks all,
StreetsAhead
Beta Was this translation helpful? Give feedback.
All reactions