That should be possible, yes. I’d suggest adding it to a custom page template in your theme.
Thread Starter
dmdj
(@dmdj)
Sorry, I’m still unclear
I would like to create a PHP script (example.php) which will fetch data from a database. I do not want it to be shown on the wp-admin as a Page.
I do not know where to place this script within the WordPress file structure.
I do not want it to be shown on the wp-admin as a Page.
It won’t be. The (blank) Page acts as a placeholder – or vehicle – for the script.
Thread Starter
dmdj
(@dmdj)
Okay, so I develop the PHP script with everything I want it to do and place it in wp-content. I give it a template name.
Then, in wp-admin, I create a blank page with the template created in the PHP script?
This I understand, but it leaves the problem that users of the site will be able to remove the page as it appears in the list of pages on the dashboard, this is what I am trying to avoid.