submit to reddit Add to Technorati Favorites Stumble Upon Toolbar


sponsored link

The Walking Dead Season 4 - Episode 1- 30 days without an accident

Watch the episode 1 of the Walking Dead Season 4 which is entitled 30 Days Without an Accident. Alternative VIDEO


Share/Save/Bookmark

Back to HOME

submit to reddit Add to Technorati Favorites Stumble Upon Toolbar


sponsored link

Watch The Hobbit: The Desolation of Smaug - Teaser Trailer

Check out The Hobbit official teaser trailer of the second in a trilogy of films adapting the masterpiece The Hobbit, by J.R.R. Tolkien. The adventure continues in the The Hobbit: The Desolation of Smaug where Bilbo Baggins journeys with the Wizard Gandalf and thirteen Dwarves, led by Thorin Oakenshield on an epic quest to reclaim the lost Dwarf Kingdom of Erebor. The Hobbit: The Desolation of Smaug will be released on December 13, 2013.


Share/Save/Bookmark

Back to HOME

submit to reddit Add to Technorati Favorites Stumble Upon Toolbar


sponsored link

Mists of Pandaria cinematic trailer

Here is the official cinematic trailer of Mists of Pandaria. Finally it comes out after 2 years of wait.


Share/Save/Bookmark

Back to HOME

submit to reddit Add to Technorati Favorites Stumble Upon Toolbar


sponsored link

Displaying wordpress posts to static HTML sites

If you've been given a task to make wordpress posts or content to display on a non wordpress site or to a static HTML site, you might be wondering how to do it.

Here is the solution i've found when i was once tasked to do it.

First is you need to make the extension of your static page where you want to display the posts to .php file (if it's not into php file yet).

Example: index.html to index.php

Then add this line of code to the top of your HTML code, should be before the <html> tag .


<?php
// Include WordPress
define('WP_USE_THEMES', false);
require('./wordpress/wp-load.php');
query_posts('showposts=1');
?>


Note: require() should be change to your own path of the wordpress loader.
Ex. your wordpress were inside of the folder called blog that is located in the root folder, then its should be
require('blog/wp-load.php');

And then lastly just put this code in the area where you want the posts to display


<?php while (have_posts()): the_post(); ?>
<h2><?php the_title(); ?></h2>
<?php the_excerpt(); ?>
<p><a href="<?php the_permalink(); ?>">Read more...</a></p>
<?php endwhile; ?>

Your done.

source


Share/Save/Bookmark

Back to HOME

submit to reddit Add to Technorati Favorites Stumble Upon Toolbar


sponsored link

Frank Mir vs Minotauro Nogueira video replay - UFC 140

Probably one of the best win from Frank Mir. Watch and see how he won and rip off Nogueira's arm.


Share/Save/Bookmark

Back to HOME