IntroThere are several ways to go about doing this, but I will take you down the simplest and best route I know of. This tutorial is only for admins that have a site layout similar to mine. That is with;
* Top Header
* Left Navigation
* (Right) Content
For beginners, we will be requiring a php file for your blog. So if you are planning to try and do this in a html file, just change the file to .php.
Our Current SituationWe have out WP installed and we have the place where we want it installed, lets call this (
http://www.mysite.com/blog.php) and then we have the location of our WP directory (
http://www.mysite.com/blog). We are going to be accessing the Classic Theme folder as well, which is located in (
http://www.mysite.com/blog/wp-content/themes/classic/)
PrepTo start out, open both the blog.php and the index in your WP directory. We are going to take a look at the blog.php first.
Solution
1)Find the very top of the page. We are going to be adding a code that calls on the WP components.
require('./blog/wp-blog-header.php');
?>
This code is relative to the setup that we discussed in Our Current Situation.
2) Now we are heading the middle of the page where your content is. Make sure there are only layout defining tags here so we know there won’t be any conflicting code. After we finish up, you can go back and add whatever you want, but for now lets remove everything except layout codes. The code we are going to add is as follows;
Code:
That PHP code comes from your index.php in the classic theme folder. This is just bringing all the components of the WP page, content wise.
That’s it! You’ve done it. You have integrated WP into your website using minimal code and time. Although, you might want to go into your WP editor to edit some of the other code to make it look a bit better. But other than that, you’ve successfully integrated WP.
OtherWhen I customized my page, I was looking for readability, so I chose to rearrange a few things. But one thing that always seemed to bug me, was the comment feel. So, I decided to rearrange it so it read like this:
Comments: (Number)
To do this, I simply inputted this code,
Comments:
Now, the comments will read like above.
WarningAs a hint of warning, when you integrated WP into your website, the comments section does not integrate. You can simply remove the
Although, if you do wish to integrate your comments into your website, you just have to edit the few modules (comments, style) and it is pretty much done. But if you are wishing for assistance, feel free to comment.
Source:
Interchange-Designs