Forums

Link to custom PHP script (5 posts)

  1. dmdj
    Member
    Posted 8 months ago #

    I want to link to a dynamic PHP script within my WordPress website that cannot be seen or edited in the CMS that can use all the WP functions and the same theme

    Is this possible?

  2. esmi
    Theme Diva & Forum Moderator
    Posted 8 months ago #

    That should be possible, yes. I'd suggest adding it to a custom page template in your theme.

  3. dmdj
    Member
    Posted 8 months ago #

    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.

  4. esmi
    Theme Diva & Forum Moderator
    Posted 8 months ago #

    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.

  5. dmdj
    Member
    Posted 8 months ago #

    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.

Reply

You must log in to post.

About this Topic