Title: Include wordpress code in pages
Last modified: August 18, 2016

---

# Include wordpress code in pages

 *  [monadfm](https://wordpress.org/support/users/monadfm/)
 * (@monadfm)
 * [19 years, 2 months ago](https://wordpress.org/support/topic/include-wordpress-code-in-pages/)
 * 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?

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

 *  Moderator [Samuel Wood (Otto)](https://wordpress.org/support/users/otto42/)
 * (@otto42)
 * WordPress.org Admin
 * [19 years, 2 months ago](https://wordpress.org/support/topic/include-wordpress-code-in-pages/#post-530955)
 *     ```
       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?
 *  Thread Starter [monadfm](https://wordpress.org/support/users/monadfm/)
 * (@monadfm)
 * [19 years, 2 months ago](https://wordpress.org/support/topic/include-wordpress-code-in-pages/#post-531347)
 * I am wanting to require a user to be logged in to access certain php pages.

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

The topic ‘Include wordpress code in pages’ is closed to new replies.

## Tags

 * [.htacess](https://wordpress.org/support/topic-tag/htacess/)

 * 2 replies
 * 2 participants
 * Last reply from: [monadfm](https://wordpress.org/support/users/monadfm/)
 * Last activity: [19 years, 2 months ago](https://wordpress.org/support/topic/include-wordpress-code-in-pages/#post-531347)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
