I have used WordPress for sometime. One feature I really like is when you create a custom template and they automatically gets the Template Name in the Admin.
I’ am making my own Custom PHP CMS and would like this type of feature in my CMS too. But I’ am totally not sure how to do this in PHP.
Anyone has any ideas, Please do share?
Investigate the
WP_Theme
class, located here. This is a relevant portion from theget_page_templates
function:This may be useful as you decide how to name and visually represent different themes.
The Theme’s name is set in the opening remarks in the style.css file in each Theme folder. That name appears when viewing the installed Themes the WP admin,
/**
* Theme Name: My Theme
And the thumbnail that appears along with the Theme name is named “screenshot.png” and is also placed in the theme folder.