Joy
(@joyously)
Are you saying that you used to see the Page Template selector and now you don’t?
Did you change your theme?
The Page Template selector is populated from the available page templates in the current theme. If there are none, the selector is not shown.
The page template file has to have the correct comment at the top in order to be found and shown in the selector.
Page templates have nothing to do with custom fields.
Hello Joy. Thank you for replying so quickly!
“Are you saying that you used to see the Page Template selector and now you don’t?”
Yes, that’s what I’m saying when I built the pages they all had the template declaration comment at the very top of their pages.
“Did you change your theme?”
No, I’ve not changed the theme since I built the site. I’ve been steadily adding pages using the page-nameofpage convention since I built the site with its first set of pages in 2016. It’s only since recently I’ve had this page issue, where that specific page’s content isn’t showing. Underscores is the underlying WordPress theme, and I built everything up from there.
“Page templates have nothing to do with custom fields.”
Yes, I’m aware, but wanted to give some context about the issue.
Joy
(@joyously)
when I built the pages they all had the template declaration comment at the very top of their pages.
I’ve been steadily adding pages using the page-nameofpage convention
Do they still have the comment? It works on my WP 5.3.2.
Naming your template files as page-pageslug.php will make them use that template due to the Template Hierarchy, and they don’t have to have a comment at the top. But the comment is needed to show it in the Page Template selector.
Do they still have the comment? It works on my WP 5.3.2.
Yes, all my pages have the comment section at the top.
Joy
(@joyously)
Perhaps you should try the Health Check plugin in Troubleshoot mode, which can disable plugins and theme for your user only, in order to isolate if it behaves differently with a different theme or no plugins.
In running the site health check it gave a few recommendations.
This one stood out to me, do you think the issue could be with the cache?
The scheduled event, wp_cache_gc, is late to run. Your site still works, but this may indicate that scheduling posts or automated updates may not work as intended.
I have another issue, After running the site check, going into troubleshoot mode, the debugger said the stylesheet was missing, and when I came out of the debug mode to select my theme that was built for the site it went to the 2020 theme, saying it’s not allowing me to load the other theme since it is ‘broken’.
This is frustrating. In running this thing I’ve not gotten another issue that wasn’t there before. Any idea what to do here? Do I just replace the stylesheet in the theme folder?
Joy
(@joyously)
Marius, the author of Health Check says:
TS Mode doesn’t touch your theme files, if core says the styesheet is missing from the users theme, it would have been missing in the first place, and they may be better served re-uloading it, or double-checking permissions
Hi, Joy.
Thank you for that reply!
I actually did the same, thanks for that assist.
In re-uploading the stylesheet the problem I was having with the templates not showing up was also fixed. Such a relief!
Thanks again for the help on this. I actually figured it out on the same day after your initial mention of using health check. Just got a bit busy with work so couldn’t reply.
Thank you very much again.