Template adding to the page
Template adding to the page
Template adding to the page
Turns out i had to hook in using “single_template” to add my theme file to the top of the stack. e.g. add_filter(‘single_template’,…..
but can’t figure out the best way to ‘setup_postdata’ for that term so that my template functions like the_archive_title will work. No equivalent function exists. I’m passing the term id and taxonomy to a function hooked into register_rest_route and returning the content of a PHP template. In that template I would ordinarily have access to … Read more
Add block templates (html) via plugin for custom post type
Custom PHP Template in Twenty Twenty-Four
How to create a template for a post in Query Loop block?
How to prevent random 302 canonical-ish redirect on custom template
How to change layout of post types templates dynamically for separate posts?
Display A Post At A URL without Redirecting
Normally, my-custom-page/ would be rewritten to index.php?page_id=2 (or whatever the ID of that particular page is). Your rewrite is omitting the page_id var, which is why you’re getting the blog index instead of your page.