/ Published in: PHP
URL: http://www.paulkuritz.com
I didn't write this, but I want to keep it for later. I don't remember where I got it: thank you, whoever wrote it!
Expand |
Embed | Plain Text
<?php $how_many=4; //How many posts do you want to show require_once("blog/wp-config.php"); // Change this for your path to wp-config.php file ?> <ul id="whats-new"> <? $news=$wpdb->get_results("SELECT `ID`,`post_title` FROM $wpdb->posts WHERE `post_status`= \"publish\" ORDER BY 'ID' DESC LIMIT ".$how_many); foreach($news as $np){ }?> </ul>
You need to login to post a comment.
