WordPress.org

Ready to get started?Download WordPress

Forums

If I decide not to use Themes, is it advisable to do the following? (3 posts)

  1. marc0047
    Member
    Posted 9 years ago #

    I'm building a special page that I'd like to exclude from my Themes folder called "special.php". It's going to have a completely different css look than the other pages.

    I'm putting this page in my root WP folder so that users can call it via "domain.com/special.php" rather than "domain.com/wp-content/themes/mytheme/special.php"

    I've so far figured out that all I have to do is turn off the themes feature in this special page:

    <?php
    /* Short and sweet */
    define('WP_USE_THEMES', false);
    require('wp-blog-header.php');
    ?>

    But should I be aware of any other issues should I decide to do this?

    Thanks.

  2. Mark (podz)
    Support Maven
    Posted 9 years ago #

    Don't do that.

    Build your special page as a complete page.
    It must have the link to wp-blog-header.php to use any wp functions
    Do not call the wp css, call your own.

  3. marc0047
    Member
    Posted 9 years ago #

    Thanks...! Actually I'm still building a complete page like this:

    ------------
    <?php
    /* Short and sweet */
    define('WP_USE_THEMES', false);
    require('wp-blog-header.php');
    ?>

    <html>
    <body>

    content, WP loops, separate CSS, etc.

    </body>
    </html>

    ------------

    I've just had considerable trouble with the query_posts and the posts_nav_link, and I was wondering if it was because I was building my page outside the Themes folder.

    But if all that is required is the 'wp-blog-header.php' to be called, then I can at least rule that out as a variable...!

    Thanks again.

Topic Closed

This topic has been closed to new replies.

About this Topic