WordPress.org

Forums

Sidebar outside of wordpress (2 posts)

  1. mrSimon
    Member
    Posted 9 years ago #

    Is it at all possible to include the WordPress sidebar on PHP pages outside of WordPress? If so, is there a tutorial or anything online on how to do this?

  2. Wish
    Member
    Posted 9 years ago #

    Where outside of the WP install did you have in mind? I've done this before for a clients' site here. (Click on continue after the flash intro, then on the next page a JS function called by the flash will reveal the blog sidebar...not in WP.) In this case the sidebar is called from the index.php file in the root, while the WP install is in the directory /blog. So that I know for sure is possible. I know this is unusual so there might not be too many resources out there.

    In a case such as what I described above you can do this:

    <?php
    require('blog/wp-blog-header.php');
    ?>
    <?php
    get_header();
    ?>
    Your page formatting, etc.
    <?php get_sidebar(); ?>

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags