WordPress.org

Ready to get started?Download WordPress

Forums

custom files with permalinks from theme folder (4 posts)

  1. Madcore
    Member
    Posted 9 years ago #

    Hi.

    I can call custom files (php or html files not associated with WordPress in any way, like a custom made image viewer) using the permalink structure, for example, show.php can be called in my host via http://www.nn45.com/main/show .

    But I need to put those files on the absolute path of the WP installation, and I want to put those files in the theme folder (wp-content/themes/theme-folder), and call those files in the same way, I mean, can put the show.php file into my wp-content/themes/theme-folder, an call it in the same way like before (http://www.nn45.com/main/show). Someone knows a way to do this?

    Thanks.

  2. moshu
    Member
    Posted 9 years ago #

    If you have the file called show.php in your theme folder, you can call it like this:
    <?php include (TEMPLATEPATH . '/show.php'); ?>

  3. Madcore
    Member
    Posted 9 years ago #

    I already know that, moshu. But that isn´t that I want.

    I want to call a file in the theme folder via permalink, for example, to call http://www.nn45.com/main/wp-content/themes/theme/filename.php, only use the URL http://www.nn45.com/main/filename. That is that I want.

  4. moshu
    Member
    Posted 9 years ago #

    Nope, that doesn't work.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.