WordPress.org

Ready to get started?Download WordPress

Forums

Sub Directories Within WP 1.5 (7 posts)

  1. DanJallits
    Member
    Posted 9 years ago #

    I am trying to use WP 1.5 themeing and templating to skin static files outside the WP directory. I have searched the Support Forum, Codex and completed a Google Search for a solution. As far as I can tell this is not possible. Please tell me it isn't true!

  2. Kafkaesqui

    Posted 9 years ago #

    If a file is PHP-based (i.e. something.php), you should be able to "theme it" by adding this to the very top of the document:

    <?php
    define('WP_USE_THEMES', true);
    require('./blog/wp-blog-header.php');
    ?>

    The path to wp-blog-header.php is an example; make sure it points to the correct location.

    From there you can use the "include" tags for any templates you need to add from the active theme:

    <?php get_header(); ?>
    <?php get_sidebar(); ?>
    <?php get_footer(); ?>

  3. DanJallits
    Member
    Posted 9 years ago #

    Do these files and sub directories occur from the root of the WordPress installation or within my theme folder. Such as

    1) ./

    or

    2) ./wp-content/themes/theme_folder/

  4. Kafkaesqui

    Posted 9 years ago #

    What files and subdirectories?

    The only file you typically need call as a standard include/require is wp-blog-header.php, and that resides in your installation root. All standard template components can be loaded with the get_* functions listed above.

    To load non-standard templates from the active theme, you can employ the TEMPLATEPATH constant in WordPress:

    <?php include(TEMPLATEPATH . '/template-name.php'); ?>

    Beyond that I'm unsure what you're asking about.

  5. DanJallits
    Member
    Posted 9 years ago #

    I am referring to static pages that I create that I want controlled by WordPress themeing. For instance if I create a static 'About' page.

  6. Lorelle
    Member
    Posted 9 years ago #

    From the Administration, click MANAGE > PAGES > CREATE NEW PAGE. In that window, you can choose the template you would like to have it "emulate". Normally, people stick with the index.php file but you can create whatever template file style you want and choose that in the pull down box. Type in whatever you want into the edit window, and name the Page "About" and then save it. You are ready to go.

    Step by step instructions can be found at Creating individual Pages.

  7. DanJallits
    Member
    Posted 9 years ago #

    Okay from the beginning.

    I already have a site created with alot of static and dynamic content. I am incorporating WP into this site. I want all content to be controlled by the WP Admin interface. Where do my static files go?

    1) Should I move my old site out of the httpdocs folder and install WP into the root? Then move my directory structure to the
    /wp-content/themes/theme-title/ folder.

    2) Should I leave my static files in place and install WP where it would logically go? For instance:
    mysite.com/personal/wordpress

    3) Or is there another way

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.