I am currently working on a project that uses a child theme (storefront is the parent theme). I need to be able to code using pure php / javascript (outside wordpress admin). Other custom template pages have *-content.php
structure, such as: foo-content.php
.
I created the custom page I'd like to develop on. However, when visiting the url, I am getting a blank white page. I am having a hard time understanding why this is.
Additionally, I tried going to wordpress admin and creating the page in the admin so it matches the file name I created my.domain/foo
, nothing seems to work - I keep getting a blank white page and no errors. Any ideas why this is?
I appreciate any suggestions.
I am currently working on a project that uses a child theme (storefront is the parent theme). I need to be able to code using pure php / javascript (outside wordpress admin). Other custom template pages have *-content.php
structure, such as: foo-content.php
.
I created the custom page I'd like to develop on. However, when visiting the url, I am getting a blank white page. I am having a hard time understanding why this is.
Additionally, I tried going to wordpress admin and creating the page in the admin so it matches the file name I created my.domain/foo
, nothing seems to work - I keep getting a blank white page and no errors. Any ideas why this is?
I appreciate any suggestions.
When you create a template page, it does not create a WordPress URL for it. So for example, if you create a PHP file called contact-content.php
it doesn't generate example/contact/
.
If you don't want to manually create a page and assign a Page Template to it (which by the way would normally be named something like tpl-content.php
- the PHP comments are what designate it to be a Page Template you can select in the editor), you can add code in your child theme so that upon activation, it automatically creates a Page with whatever slug you want. If it's just your site, you'll know your permalink structure so you can be sure the URL will be what you wish. If it's something you're applying to many sites with different settings, you may still face the issue of different styles of permalinks - i.e. example?p=123
versus example/contact/
.