• Do I need to use a template? I am trying to integrate WP with my existing site. I would like to have all of my files in the root directory, including CSS and comments.php files. Can I do this?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Modify the index.php in wordpress’ root directory to contain the following.

    <?php
    // disable the theme feature first
    define('WP_USE_THEMES', false);

    require('./wp-blog-header.php');
    /* now you can insert whatever here that usually belongs to themes directory */
    ?>

    Thread Starter mosley

    (@mosley)

    OK, I did that. But a theme is still selected in the Presentation section of the dashboard. Will this affect anything?

    Can I keep all of my files in the root directory?

    And my CSS styles do no follow thru for the comments page.

    Thanks

    OK, I did that. But a theme is still selected in the Presentation section of the dashboard. Will this affect anything?
    Well, if you use template tag, say, get_header(), it will grab header.php from currently active theme. So, don’t use template tags to get a reference to any files, e.g. stylesheet file. Just do your own coding.

    <?php
    // disable the theme feature first
    define('WP_USE_THEMES', false);
    require('./wp-blog-header.php');
    ?>
    <html>
    <head>
    </head>
    <body>
    <?php include('myownstuff.php');
    <?php include('mysidebar.php');
    </body>
    </html>

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Do I need to use a template?’ is closed to new replies.