templates – How can I get a single php file that is the equivalent of an existing WordPress page?
When I use my php file as a template and no other content on the page, it works fine but when I run the file directly (via PhpStorm), there are missing elements (such as comment_status) that cause exceptions. I am doing the require of wp-load and calling get_header() within the file, but obviously something is still missing, that a ‘real’ WP page has. So – I’d like to see the Php from the otherwise ‘blank’ page, that WP uses. Viewing source of course only shows the final html.
/* Template Name: BlankPage */
When used as a template, the ‘require’ line is commented out.
Via the WP editor, I checked the ‘allow comments’ checkbox. Don’t know how to do that yet, via php.