So you have a WordPress blog but you're also creating pages not through WordPress. You're thinking about how to incorporate your categories menu, archive menu and other elements into the other pages you're making. Well it is very simple and I'll show you exactly how.
- Pages must be in PHP
- Pages must be on the same server
If you've met the requirements then you are half way there. Next thing you need to do is open up the file in which you would like to incorporate the elements in. At the top you just need to add the these two codes:
Now the second line: require('wp-blog-header.php'); you'll have to have the actual path to the file. The file wp-blog-header.php is located in the root WordPress folder, so guide your file to the right path.
Calling the Elements
Now you can call the elements on the page by throwing the following code in your page:
<?php wp_loginout(); ?> //Logout
<?php wp_get_archives('type=monthly&format=none'); ?> //Archives
<?php wp_list_categories('style=none&show_count=1&title_li=<h2>Categories</h2>'); ?> //Categories
There you have it, now you can add all the menu elements on non-WordPress pages.