Forums

Include wordpress code in pages (3 posts)

  1. monadfm
    Member
    Posted 5 years ago #

    I want to add the function of checking users against the wordpress blog users database. I want to add this to my php pages that are not part of wordpress. Where within wordpress is this located? What do I need to include in the header of my php pages to use this funtion?

  2. Otto
    Tech Ninja
    Posted 5 years ago #

    define('WP_USE_THEMES', false);
    require('./wp-blog-header.php');

    Adding those two lines will include most of the blog functionality. You can then use the various user related functions in WordPress to check whatever you want.

    What are you actually wanting to do? What do you mean by "function of checking users against the wordpress blog users", exactly?

  3. monadfm
    Member
    Posted 5 years ago #

    I am wanting to require a user to be logged in to access certain php pages.

Topic Closed

This topic has been closed to new replies.

About this Topic