Change filename of custom page templates without breaking stuff
-
Hi,
My theme contains multiple custom page templates (page-knowledgebase, page-knowledgebase-3, page-knowledgebase-4, etc).
I want to change the filename (slug) of several page templates files. But if I do so all relevant pages fall back to the default page template. Meaning I must reset the page template of all these pages again.
Is it somehow possible to avoid this?
I prefer doing this directly in database, when new theme version is installed. Using global $wpdb. When I open phpmyadmin I notice meta_key “_wp_page_template” and (for example) meta_value “page-knowledgebase-3”. So meta_value needs to be changed.
Guido
Viewing 8 replies - 1 through 8 (of 8 total)
Viewing 8 replies - 1 through 8 (of 8 total)
- The topic ‘Change filename of custom page templates without breaking stuff’ is closed to new replies.