I checked everything suggested in that response: “page attributes” option is checked, template file is located at theme root folder, I tried several file encoding options in my text editor (UTF8 with or without BOM), I tried switching to another theme then back to my custom theme, I do have the right stuff on top:
<?php /* Template Name: Page Actualites */ ?>
Why am I still not seeing the page template dropdown list?
Answers:
Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.
Method 1
The page was set as the posts page in settings > reading, which prevents from chosing a specific page template since this setting automatically assigns index.php as the page template for that page.
Method 2
Had the same issue when I reinstalled wordpress, realized I haven’t activated the theme on which my templates are.
So make sure you enabled your theme.
Gosh, i forget this everytime 😡
Method 3
The documentation of the feature is really good. So check them, especially the name of the file, also the rights of the file via FTP or ssh – is it readable.
Do not use page- as a prefix, as WordPress will interpret the file as a specialized template, meant to apply to only one page on your site.
Remove also the PHP close tag, not necessary and often more problematic.
Method 4
WordPress 5.8 introduced template editor: https://make.wordpress.org/core/2021/06/16/introducing-the-template-editor-in-wordpress-5-8/
All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0