Embeding Wordpress in PHP templating site
I have a simple site (header.php, footer.php and some content sites in between) and I want to include Wordpress as one of them. I install it and it works as domainname.com/blog, but I am wondering if I can get it to work under regular header.php, just like with other pages (Home, Services, Resources, Blog, Contact)
I am using something like this:
<?php
$subtitle = "Media Services";
include("header.php");
?>
When I add the following code, it does not load anything"
include("blog/wp-blog-header.php");
,but a test file like test.php (with echo "This is test etc..") works with the same pathname.
Does anybody know what am I doing wrong. I basically want to have blog under the header here http://67.23.244.109/~belerose/blog.php instead of http://67.23.244.109/~belerose/blog
Thank you.
Greg K posted this at 08:21 — 10th May 2012.
He has: 2,145 posts
Joined: Nov 2003
Are you wanting the entire blog to be viewable inside of the blog.php or are you only talking about including the main content? One thing to consider is that links that WP generates will most likely be back to /blog/whatever....
What you are actually wanting to display makes a huge difference on what route to take.
-Greg
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.