Just in WordPress 4.9 there’s this bug: https://core.trac.wordpress.org/ticket/42573 causing the template files to only be rescanned once every hour.
To fix (until they release a new WP version with this changed), download the patch on that bug ticket and make the changes from the patch to wp-includes/class-wp-theme.php
.
Hope this saves someone the 2 hours I wasted on this..
Related Posts:
- Limit number of pages that use a specific template?
- How to dynamically save a selected option from page “Templates” selectbox?
- Custom page template not working
- How do I pass data from page content to the underlying PHP template
- the_content of template page
- Use same page-mypage.php template for several pages
- Avoid pages losing template association on site re-deploy
- WordPress blog posts template bug [closed]
- Adding styles/scripts to specific page
- WordPress form submit to custom page template does not work
- How do you assign custom template for Posts page (under Front page displays setting)
- Avada Theme – Display results from a specific category [closed]
- how bbPress and buddypress add their own page templates to the page template drop down on the page editing screen
- May I know where to edit the tax rate?
- Get page id by template
- Change page template programmatically ?
- Conditional tag to check if ‘page.php’ is being used?
- A check for if is parent page, if has children, if has grandchildren
- Listing pages which uses specific template [duplicate]
- WordPress page edit does not save selected template
- Is it possible to manipulate the list of page templates?
- Set page template automatically based on parent
- Creating a template using a specific slug name, for a page with a parent page
- Is there a default template file for child pages / subpages?
- How to display code if it is not certain pages?
- Multiple areas of dynamic content in a page
- How do I set and list page_template with wpcli?
- How to inject custom url path for page ?
- Add custom admin menu item for pages using a certain template
- WP is not using the select custom template.php that its selected for a page
- Is it possible to set a page template on a dynamic home page (articles list)?
- how to show all post in my page-grid.php template page
- What’s the most minimal way in which a page can be hooked into WP?
- Why is custom template not seen as page with is_page()?
- Page with page template not using template in Preview
- How do I create multiple page while active a theme
- How to make certain page templates visible to admin only
- Subpage template
- How to add meta boxes to Pages
- Where can I access my custom page template?
- How do I create a separate page for each author?
- Display a specific dynamic sidebar widgets on a specific page
- Custom Template 404 for specific custom post type
- Password Protected Page Title
- How do i change page template in bulk?
- Load specific page template based on URI
- I have index.php and other files, how do I display other pages?
- is_home() returns TRUE on page template
- Determine page content based on page parent
- Using Pages to handle calls for custom post types
- Missing ‘Page Attributes’ in page edit
- How to make tag post listing page working?
- page-name.php doesn’t execute on custom template
- Could be a namespace conflict (?) with login form and register form on the same page
- Custom page template for multiple pages
- Remove Content edit box from ALL pages (not posts)
- Get parent of current page
- Hide page templates without using ‘unset’
- Custom page with queries returns 404
- How to capture GET argument on static page
- Remove comment section from new page
- WordPress theme: Add page content to the bottom of the Contact form
- WordPress 3.2 – removed ability to select a page template in the page attributes when adding a new page?
- pre-existing data, and entities
- How do you implement a page template automatically being applied to a page?
- Need to create a custom page on a website
- How to create different template designs for different pages in WordPress [closed]
- require_once not working
- Custom form not showing in correct place on page
- Displaying posts on homepage – Template Page
- Page templates in subdirectories and auto generator
- Use page template for custom $_GET content
- creating single page with 2 columns while theme is 3 column
- How to bypass 404 for certain pages/posts?
- Outputting content from page
- Custom folder for wordpress page templates
- How does wordpress link page templates to individual pages
- page template – undefined structure in source code
- Create custom page to author.php
- Different template parts when on different pages
- Create page template
- Updating page template pragmatically
- Using external DB within wordpress
- WordPress Page All Content In Template Good Or Bad Convention?
- display different pages content on single page
- Content template when adding a new page
- How to display time when page is created and edited
- Call a function on every wordpress pages only
- Specify parent page template
- WP Template Hierarchy – Need help choosing the correct templates
- Auto-Create Pages from Template Directory
- different single.php for different page templates
- Showing certain page without redirection
- Create a new page for each form selection
- Using custom post types within a section of a template
- Naming custom page templates
- How can I use Page editor for two separate templates?
- Display random page
- exclude page element from specific pages
- Custom SINGLE page with custom metaboxes and custom template