WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Welcome page with WPDB access? (3 posts)

  1. weasello
    Member
    Posted 8 years ago #

    I want my blog to have a springboard page - you know, a welcome page where you click a link and it takes you to the main blog.

    HOWEVER,

    I want this springboard page to have access to the WP database, so I can't just code up my own HTML and slap it on the site. It'll have to be integrated.

    I've toyed with making a new template file but I'm having trouble. Can anyone think of an elegant solution to this?

  2. moshu
    Member
    Posted 8 years ago #

    In this tutorial
    http://www.transycan.net/blogtest/2005/07/05/integrate/
    in Scenario #1 you'll find the method how to make your other files "WP aware".

  3. weasello
    Member
    Posted 8 years ago #

    That worked! For reference (future searchers):

    <?php
    require('./path-to-your-blog/wp-blog-header.php');
    ?>

    That's all you need to include the WPDB and all it's functions. The link above (provided by Moshu) goes on to describe how to insert "the loop" into another file if you need it.

Topic Closed

This topic has been closed to new replies.

About this Topic