Direct link to a PHP file (3 posts)

  1. Steve Bruner
    Posted 8 years ago #

    I want to create a theme that has a built in "page" that will work out of the box when someone installs it.

    Is it possible to create a php file (ie mypage.php), and have a direct link to it: http://www.mydomain.com/mypage.php ?


  2. jamesl73
    Posted 7 years ago #

    Did you find a solution to this? I'm looking to do the same thing.

  3. phrozen755
    Posted 7 years ago #

    try <?php bloginfo('template_url'); ?>/mypage.php that will link that mypage.php file to the root of your themes directory, so when you pack it all up in a .zip, it'll look at the root for that file.

    Alternatively you can use

    <?php bloginfo('template_url'); ?>/files/mypage.php to start organizing your files in seperate folders, like in this example linking to your 'mypage.php' file within your template's folder with a subdirectory called "files".

    Hope this helps, GL!

Topic Closed

This topic has been closed to new replies.

About this Topic