Fix WordPress Custom Page Template Not Showing In Template Dropdown
WordPress page templates are a great way to customize the look and feel of a WordPress page. We can easily create custom WordPress page template and select it from the “Template Dropdown” in Page Attributes. However, there is a bug in WordPress 4.9. Custom WordPress page templates not showing up in template dropdown. That’s because WordPress developers added 1-hour cache, so page templates not showing up in template dropdown instantly. It’s very annoying to wait 1 hour after creating a page template to use it on a page right?
Fortunately, I got a solution from WordPress bug tracker. Apparently, we have to use following code snippet in “function.php” till WordPress developers release official solution.
If you can’t see the “Page Attributes” section, check the “Screen Option” in the top right corner. Make sure “Page Attributes” checkbox checked.
Cover Photo by Water Journal on Unsplash