• Any hope of an MT-like “Recent Entries” hack so that the titles of the last N entries would be listed and linked?
    Sorry for making a mistake and posting this inquiry incorrectly in the WordPress and XFN forum.
    Thanks in advance.

Viewing 5 replies - 1 through 5 (of 5 total)
  • get_archives(‘postbypost’, 10);

    Any chance of an offset on that?

    this is what i did in my blog, try it.
    <?php
    $blog = 1;
    require_once(‘blog.header.php’);
    function get_recent_posts($limit = 10, $before = ”, $after = ‘
    ‘) {
    global $wpdb, $tableposts, $now;
    global $siteurl, $blogfilename;
    $posts = $wpdb->get_results(“SELECT ID, post_title, post_date FROM $tableposts WHERE post_status = ‘publish’ AND post_date <= ‘$now’ ORDER BY post_date DESC LIMIT $limit”);
    $output = ”;
    foreach ($posts as $post) {
    $post_title = stripslashes($post->post_title);
    $post_date = mysql2date(‘d-m-Y @ h:i’, $post->post_date);
    $permalink = “$siteurl/$blogfilename?p=$post->ID&c=1”;
    $output .= “$before » $post_title $after”;
    }
    echo $output;
    }
    ?>
    <b>Latest 10 Entries</b>
    <?php get_recent_posts() ?>

    or u can use RSS Syndication. if that’s what u looking for, showing the last 10 posts on the blog on non blog pages of ur site… ??

    That’s a good hack… I’ll have to think if that ends up being too expensive to do frequently.. Though I guess in a big site, that’s a great approach to getting to blogged content.
    d

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Recent Entries’ is closed to new replies.