WordPress.org

Ready to get started?Download WordPress

Forums

Trying to extract $user_identity for use on static page (1 post)

  1. pcoghlan65
    Member
    Posted 5 years ago #

    So I found this page that explains how to include the wp-blog-header.php so as to be able to access WP functions. I included some of the relevant text at the bottom of this post. I tried it on my 2.7 install but it states that the get_header function doesn't exist.

    Anyone know a way with 2.7 that I can include the user name in a static (external to WP) page?

    Thanks,
    Paul
    ___________________________
    To incorporate or integrate WordPress with your static front page, you can include the header, sidebar, footer, and even a mini-version of the WordPress Loop.
    Include the Header

    To include the header from your WordPress Theme to maintain a consistent look, add this to the top of the page, using the folder path name you installed WordPress into:

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

Topic Closed

This topic has been closed to new replies.

About this Topic