Changes between Version 1 and Version 2 of Ticket #13265, comment 43
- Timestamp:
- 02/25/2014 06:37:23 PM (11 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #13265, comment 43
v1 v2 3 3 That's the use case I have with a project. I'd like to make certain page templates in the theme available only if portfolio post types are active on the site. I'm working around the lack of filter with javascript for the moment: http://wptheming.com/?p=14753 4 4 5 Below I attached a plugin that uses the page_templates filter to remove a template from TwentyFourteen from the drop down list(page-templates/contributors.php): https://core.trac.wordpress.org/attachment/ticket/13265/core-remove-page-templates.php5 Below I attached a plugin that uses the page_templates filter to remove a template from TwentyFourteen (page-templates/contributors.php): https://core.trac.wordpress.org/attachment/ticket/13265/core-remove-page-templates.php 6 6 7 If that specific template has been selected for the page the #page-template select box will default to "Default Template" . However,the actual template loaded on the page does not update until the post is re-saved.7 If that specific template has been selected for the page the #page-template select box will default to "Default Template"- but the actual template loaded on the page does not update until the post is re-saved. 8 8 9 9 I also tested @wpsmith's plugin. I was able to select the "test" page template successfully from the admin- however, the template did not appear to load "test.php" template on the front end. Perhaps a little more work is needed? I'll see if I can find a solution.