View Single Post
12-07-2010, 08:44 PM
#13
Jordan is offline Jordan
Jordan's Avatar
Status: #pugs {display: block;}
Join date: Jan 2007
Location: Chicago
Expertise: CSS, HTML, PHP
Software: Sublime Text 2
 
Posts: 1,187
iTrader: 7 / 100%
 

Jordan is on a distinguished road

  Old

Well, if you need to use it in a non-WordPress blog, you're still doing it the wrong way. You can use the same query I use. You just add:

Code:
 <?php
require('/the/path/to/your/wp-blog-header.php');
?>
So now we have:
Code:
 <?php
require('/the/path/to/your/wp-blog-header.php');
?>
<?php query_posts('showposts=5'); ?>
<?php while (have_posts()) : the_post(); ?>
  <li><a href="<?php the_permalink(); ?>">
       <?php the_title(); ?></a></li>
<?php endwhile; ?>
Again, you can refer to the codex for using WordPress outside of.. WordPress: http://codex.wordpress.org/Integrati...h_Your_Website

Thanked by 2 users:
Spherions (12-07-2010), Village Genius (12-07-2010)