• I am looking for a plugin that will take recent posts title, with date to place on a page.

    Basically, I want to have a ‘recent news’ section that literally posts the latest date, and headline from my blog.

    Any suggestions?

    Thanks.

Viewing 4 replies - 1 through 4 (of 4 total)
  • You could put this in a Page Template.

    <?php
    //show latest post with date
        $args=array(
          'post_type' => 'post',
          'post_status' => 'publish',
          'posts_per_page' => 1,
          'caller_get_posts'=> 1
          );
        $my_query = null;
        $my_query = new WP_Query($args);
        if( $my_query->have_posts() ) {
          echo 'Latest of Post';
          while ($my_query->have_posts()) : $my_query->the_post(); ?>
            <p><?php the_time('m.d.y') ?> <a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></p>
           <?php
          endwhile;
        }
    wp_reset_query();  // Restore global post data stomped by the_post().
    ?>
    Thread Starter bigshift

    (@bigshift)

    I must be missing something.

    I copy and paste the above code in my open div, and all that is displayed is the ‘script’ as if it were in a ‘p’ tag rather than code.

    If I place it in a <script> tag, the code doesn’t render, but neither does the result.

    Thanks. Appreciate the assistance as I am just starting to get into more advanced stuff with wp and the codex.

    Please paste all the code from that page template that is displaying those posts into a pastebin such as wordpress.pastebin.ca, and report the link back here. Maybe someone can spot your problem. Thanks.

    Thread Starter bigshift

    (@bigshift)

    OK. placed it on wordpress.pastebin.ca…

    http://wordpress.pastebin.ca/1760886

    Thanks.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘“Recent Posts” plugin’ is closed to new replies.