I want to get the template in the theme which being in use of the current edited post(_type)/Page.
Lets say im editing a single Post, Then i want to retrive that it using the template single.php
And if im editing a Custom Post Type that have its own single-{post_type}.php
i want to retrive that.
How can i archive that? are there any global variables that store this information?
I know that pages saves it as meta_data.
I dont have mutch to go with but i have been looking att get_query_template
and locate_template
but i need something in the right direction.
Thanks.
Basically this isn’t available in admin. You can take a look at my profile, go to my github page and grab the “current admin info” plugin. But this won’t help you much.
This would show you the template name:
On the front end you can use the following plugin, that will display that info (it’s from another question).
If all this doesn’t help as starting point, then please take a look at all the related answers.
This answer was originally an edit of the OP to my other answer. I’ll correct the code later on.
So i ended up with a pretty simple solution. This answer did get me in the right direction.
I don’t now if this is the best way to do it but it fills my requirements: