Ok, code has been reworked to get rid of some bugs you might come across over time. You must go to this version!
<?php
mysql_connect(DB_HOST, DB_USER, DB_PASSWORD);
mysql_select_db(DB_NAME);
$query = mysql_query("SELECT * FROM [prefix_]posts WHERE post_status = 'publish' AND post_type = 'post' ORDER BY post_date DESC LIMIT 0,7");
while($r = mysql_fetch_array($query)) {
$postdate = $r["post_date"];
$unixPostdate = strtotime($postdate);
$mondaydate = strtotime('Monday');
if(date('D')=="Mon") $mondaydate = strtotime('Today');
if($unixPostdate>$mondaydate) {
echo "<a href=\"".$r["guid"]."\">".$r["post_title"]."</a>";
}; }; ?>
Replace [prefix_]
with your database prefix (wp_
by default) and enter your database details in to the first two lines (eg mysql_select_db("mydbname");
).
To get the permalink use echo "<a href=\"". get_permalink($r["ID"]) ."\">".$r["post_title"]."</a>";
in place of the old echo.
When I get round to it I shall turn this in to a plugin, and post here with its url. I’m thinking it would be nice to be able to set this to only one filter one category (or two, or even more) and allow the user to start it from any day.
PS. What’s your URL?