Title: Adding headlines to non wordpress page
Last modified: August 18, 2016

---

# Adding headlines to non wordpress page

 *  Resolved [alittle116](https://wordpress.org/support/users/alittle116/)
 * (@alittle116)
 * [18 years, 9 months ago](https://wordpress.org/support/topic/adding-headlines-to-non-wordpress-page/)
 * my wordpress blog is only a small portion of my website. i would like to have
   the 5 most recent headlines appear on my website homepage. as of now, my homepage
   is not connected to wordpress in any way.
 * i am bran new to this. i appreciate the help!

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

 *  [mrmist](https://wordpress.org/support/users/mrmist/)
 * (@mrmist)
 * [18 years, 9 months ago](https://wordpress.org/support/topic/adding-headlines-to-non-wordpress-page/#post-606992)
 * If you include the header file into your other page(s) via PHP then you can access
   any of the WordPress functions in the rest of the page.
 *  Thread Starter [alittle116](https://wordpress.org/support/users/alittle116/)
 * (@alittle116)
 * [18 years, 9 months ago](https://wordpress.org/support/topic/adding-headlines-to-non-wordpress-page/#post-607119)
 * instead of including the entire header file, can you tell me what code specifically
   needs to be on the page?
 *  [mrmist](https://wordpress.org/support/users/mrmist/)
 * (@mrmist)
 * [18 years, 9 months ago](https://wordpress.org/support/topic/adding-headlines-to-non-wordpress-page/#post-607121)
 * I don’t mean include the actual file, I mean add a PHP include to the top of 
   your existing (non-wordpress) PHP file. Thusly –
 * <?php
    require(‘./path-to-your-blog/wp-blog-header.php’); ?>
 * Then you can use the WordPress functions in the rest of your page.
 * If you want to find *exactly* what PHP code to use instead of simply including
   the header, then a) I reckon you’re a bit mad and b) you’d have to check the 
   header file code yourself to find out how it works.
 *  Thread Starter [alittle116](https://wordpress.org/support/users/alittle116/)
 * (@alittle116)
 * [18 years, 9 months ago](https://wordpress.org/support/topic/adding-headlines-to-non-wordpress-page/#post-607156)
 * i am sorry this is still not clear to me. on my non wp pages i am already including
   a header.php file.
 * the wp header contains all sorts of stuff not relevant to the rest of my site
   and it does not seem right to include the whole thing.
 * i would like to find out what code in the wp header file (i am using the kubrick
   theme) is necessary to allow wp functions on non wp pages. but i cant figure 
   this out.
 *  [whooami](https://wordpress.org/support/users/whooami/)
 * (@whooami)
 * [18 years, 9 months ago](https://wordpress.org/support/topic/adding-headlines-to-non-wordpress-page/#post-607157)
 * _i would like to find out what code in the wp header file (i am using the kubrick
   theme) is necessary to allow wp functions on non wp pages. but i cant figure 
   this out._
 * The theme you are using doesnt matter. So dont bring up it again.
 * wp-blog-header **loads** EVERYTHING needed to include wp functions on non-wordpress
   files. And calling it doesnt add anything to a non-wordpress page that you havent
   asked it to– so if you are seeing something, you put it there.
 * You can test that by uploading a blank php file, and using the include and NOTHING
   else.
 *     ```
       <?php
       require('./path-to-your-blog/wp-blog-header.php');
       ?>
       ```
   
 * Furthermore, I am going to guess you are including the theme header — thats not
   what you want to include. LOOK at the code that was provided to you.
 *  Thread Starter [alittle116](https://wordpress.org/support/users/alittle116/)
 * (@alittle116)
 * [18 years, 9 months ago](https://wordpress.org/support/topic/adding-headlines-to-non-wordpress-page/#post-607159)
 * thank you. i understand now. since you are being so helpful, let me ask you one
   more question. how do i limit this list of posts to only 5 without making the
   changes in my admin panel?
 * all my attempts at finding an answer have led me to the ‘Custom Query String’
   Plugin.
 * However this does not seem to be the right solution since my list of articles
   is not a query by date, author, category, etc…
 * this is the code that i am using at the momemnt
 *     ```
       <?php while (have_posts()) : the_post(); ?>
       			<div class="post">
                       <div class="entry">
       					<p><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></p>
       					<?php the_excerpt() ?>
                       </div>
                   </div>
       			<?php endwhile; ?>
       ```
   

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

The topic ‘Adding headlines to non wordpress page’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 6 replies
 * 3 participants
 * Last reply from: [alittle116](https://wordpress.org/support/users/alittle116/)
 * Last activity: [18 years, 9 months ago](https://wordpress.org/support/topic/adding-headlines-to-non-wordpress-page/#post-607159)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
