Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Currently, I have a static website. I wanted to know how I could go about replacing one of the static pages with a WordPress page that will function as the websites blog?

I know how to create a WordPress template, but I'm a little confused about what the URL would be? The website in question is www.3elementsreview.com and the blog would be at www.3elementsreview.com/3eblog.

So, how can I replace that current page (3eblog), with a WordPress version?

Thanks,

Marlon

share|improve this question
    
do you want to add WordPress elements to the current static page, or do you want WordPress to assume control of the 3eblog directory and use its own theme? –  Milo Nov 15 '13 at 3:17

2 Answers 2

Keep your static site as is and install wordpress in your /3eblog/ folder.

This will give you an entire wp install just for that sub folder - the rest of your site will remain intact. You can then use WP out of the box with one of the many free themes available.

Your server will look for index.php in the /3eblog/ and serve up the wp install, the rest of your site will work as normal and serve up index.html from the root.

You then just link to : www.3elementsreview.com/3eblog/ from your main static pages.

share|improve this answer

In order to transform regular PHP pages into ones that utilize WordPress, you need to add either of the following code snippets to the start of each page.

<?php 
/* Short and sweet */
define('WP_USE_THEMES', false);
require('./wp-blog-header.php');
?>

<?php
require('/the/path/to/your/wp-blog-header.php');
?>

Then you can use template tags and Wordpress built-in functions.

Next time please visit the Codex: http://codex.wordpress.org/Integrating_WordPress_with_Your_Website

share|improve this answer
1  
Correct in principle but I would assume "static" site is plain HTML (or even if it's dynamic it's not given that it is powered by PHP). –  Rarst Nov 15 '13 at 9:46

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.