Welcome, Guest. Please login or register.

Login with username, password and session length
February 08, 2012, 06:04:16 PM
[Less]
  • News: ATokar.net 3.0 has been released! Click here for more info.

  •  
linktree ATokar.net  >  Coding  >  Tutorials
linktree Topic: How to integrate WordPress into Existing website
Pages: [1]   Go Down
  Print  
Author Topic: How to integrate WordPress into Existing website  (Read 4498 times)
0 Members and 1 Guest are viewing this topic. Bookmarked by 0 members.
TaylorFlatt
Karma: +0/-0
Offline Offline

Gender: Male
Posts: 3



« on: November 09, 2008, 09:12:20 PM »

Intro

There 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 Situation


We 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/)

Prep

To 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.
Code: (php) [Select]

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:
Code: (php) [Select]





',''); ?>






—

@





















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.

Other

When 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,
Code: (php) [Select]

Comments:


Now, the comments will read like above.

Warning

As a hint of warning, when you integrated WP into your website, the comments section does not integrate. You can simply remove the
Code: (php) [Select]




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
« Last Edit: November 11, 2008, 09:50:51 PM by Cleo » Logged
Cleo
Administrator
Developer
Karma: +6/-0
Offline Offline

Gender: Male
Posts: 172




WWW
« Reply #1 on: November 09, 2008, 09:40:24 PM »

Nice tutorial! :)

(just a note: I replaced the color tags with code ones so it gets displayed correctly.)
Logged

TaylorFlatt
Karma: +0/-0
Offline Offline

Gender: Male
Posts: 3



« Reply #2 on: November 09, 2008, 09:42:11 PM »

Oh ok.  I didn't really know how to use those.  The only forum I'm familiar with is IPB, so sorry for the mistake.  Thanks for the reply. :D
Logged
Pages: [1]   Go Up
  Print  
 
Jump to:  


Copyright © 2007–2010 ATokar.net. All trademarks are property of their respective owners.
Powered by SMF | SMF © 2006–2007, Simple Machines LLC
Page created in 0.096 seconds with 28 queries.
Contact Us - ATokar.net - XML - Sitemap - Top
Valid HTML 4.01! Valid CSS! Valid RSS! Powered by Linux Powered by MySQL Powered by PHP Powered by Apache 2.2