If I'm understanding correctly, I can create a custom template for a specific page by creating a file called page-{my_page_title_or_id)
, which gets displayed when visiting that page. I can also create a custom template for pages by adding Template Name: My Page Type
in the header comments.
However, the situation with posts seems very different. As far as I can tell, creating a file called single-{post_title_or_id)
doesn't force display of that file for the given post. It appears to do nothing at all.
I understand that I can create a custom post type and display instances of that with single-{post_type_name}
, which is great. However, if I want to create a template for just one particular post, it seems like overkill, and I would have to include conditional logic for when the id/title of the post matched the onle I want to display.
Am I missing something here? Is my understanding of the situation correct? Please can someone tell me the most simple way to display a custom view for a post with a given title/id?