WordPress.org

Ready to get started?Download WordPress

Forums

Direct link to a PHP file (3 posts)

  1. Steve Bruner
    Member
    Posted 6 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 ?

    Thanks
    Steve

  2. jamesl73
    Member
    Posted 5 years ago #

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

  3. phrozen755
    Member
    Posted 5 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