How To: Integrate Non-WordPress Pages in WordPress
November 26th, 2008 by MattHave you ever put together a cool script or page on your own, and then wanted to integrate it into WordPress so it would have the same look and feel as the rest of your site?
Maybe you have a custom survey you put together with PHP, or a web directory, a Job Board, or some other thing that you can’t really do inside WordPress.
Here’s a bit of code that will help integrate your script with your theme, and will also make other internal WordPress functions available to your script:
<?php
require('../wp-blog-header.php');
get_header();
?>
Your page content here.
<?php get_footer(); ?>
Easy enough? Just make sure the require statement points to the correct path of wp-blog-header.php. This example assumes that your script is inside a directory rather than the root (e.g. /myscript/index.php). If your script is in the same directory as wp-blog-header.php, just change the “../” to “./” ans you’re all set.
Whenever your page is loaded, WordPress will be called upon as well, and your theme will be added in around your script. There’s a small chance that WordPress may conflict with your script though, so be sure to test and change any variables and functions that interfere with WordPress’s internals.
Its interesting to come across this one. Let me try out the code… Thanks!
Thanks, been looking for something like this. Works like a charm!
there is a mistake on get footer function, i’m using wp 2.7 and it works if i write like this : <?php get_footer(); ?>
@firman: Oops, it seems I made a typo.
Thanks for pointing it out.
I am new to wordpress. Can anyone help me to solve the below issue?
Currently when an item is checked out from the shopping cart, it is brought to the payment gateway. However, the seller has no visibility on the item order number and who bought them. Seller wanted to add a reference number on the database that can be linked to the order number on the payment gateway. So, how to intergrate the payment gateway with wordpress?
Thanks
Hi friends,
I am new user of wordpress .
Actually I have to my site integrate with wordpress means i have to show the blogs into into sites But I need a single login screen and after logged in, users will redirect to a common Control Panel. Presently, I hace two control panel one is my site(which is created into plain php) another one is “wp”(after wp installation.)
2. Need to register users from the non-wordpress based site. But I don’t how can I achieve the following:
[A] On registration time, store password in the user table. Please help to create the password with wordpress encrypion.
[B] How can compare the password with database password on login time?
3. Where can I find out Wordpress Function References?
I hope that, the comment is active and will help me as soon as possible