0

I recently renamed a custom template file, changing it from template-programs.php to template-program-schedule.php.
In my template dropdown menu, Program Schedule shows up as expected, but Programs is also still there.
I have cleared all caches and hard refreshed the browser, but it still shows up.
I've tested the template dropdown functionality by creating dummy template files, which always appear in the dropdown menu after creation and then disappear as expected when deleted, but Programs remains in the list.

I searched throughout the whole website directory, and there is no template-programs.php file anywhere.
Can a template listing be generated by a plugin or some other means without there being a respective template file?

How can I remove this template dropdown listing and/or track its source? Or, is it possible to flush and rebuild the template dropdown menu?

1 Answer 1

1

Scan the files for a comment header that might have Template Name: Programs present. The template drop-down is populated by the comment header in files. I believe this is only true for files in the theme's root folder and from a template sub-folder within the theme (if one exists).

1
  • There was an old template file in an archive folder that I had overlooked because its filename had nothing to do with programs. I opened the file, and Template Name: Programs was in the comment header. Thank you for your answer, and for reminding me that the template dropdown is populated by the comment header.
    – Paul Brady
    Oct 1, 2021 at 19:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.