For pages, create a PHP template file with a template name comment. For posts, register a custom template using template_include or theme filters. Assign page templates from the editor. Post templates depend on theme support or block theme settings.
How do I create a page or post template in WordPress?
Share