Integrating WordPress in a Static Page
Posted by beThinker | Posted in WordPress | Posted on 03-06-2009
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.
How to include a Header
To include the header from your WordPress Theme you must add code below to the top of the page and using the folder path name you installed WordPress into.
Here is the code:
1 2 3 4 5 | <?php define('WP_USE_THEMES', false); require('./wordpress/wp-blog-header.php'); get_header(); ?> |
The purpose of requiring or including wp-blog-header.php is to let you use of any WordPress function or template tag.
Note: In rare cases declaring the WP_USE_THEMES constant to false may produce non-CSS formatted page output.
How to Include The Sidebar or Footer
To add the sidebar and/or footer from your WordPress Theme, include one or both of the following code:
include this at the right container of your WordPress Theme:
1 | <?php get_sidebar(); ?> |
include this at the bottom of the page:
1 | <?php get_footer(); ?> |
I hope this tutorial is helpful.



Thanks for this info. How about integrating a Wordpress blog into a static site? I like our static site, but would like to integrate a blog as one of the pages. Can I still use the navigation?
Thanks,
Laurels Manhattan
laurelsfurniture (at) gmail.com
Yes you can integrate a Wordpress blog into a static site. Can I still use the navigation? You mean the navigation of the Wordpress Blog, right?