Support » Plugins and Hacks » Adding post date to recent-post plugin

  • Resolved Daisyhead

    (@daisyhead)


    I am using the recent-post plugin and would like to add the date of each post prior to the link for the entry. I have tried tweaking the code on my own but no luck. Could anyone offer any help?

    Thanks!

Viewing 8 replies - 1 through 8 (of 8 total)
  • As an FYI, here’s what I tried to do but I’ve been unable to get the date to pull for each entry. My additions are in bold:

    foreach ($posts as $post) {
    <b>$post_date = ($post_date);</b>
    $post_title = stripslashes($post->post_title);
    $permalink = get_permalink($post->ID);
    $output .= $before . '<b>. $post_date .</b> <a href="' . $permalink . '" rel="bookmark" title="Permanent Link: ' . htmlspecialchars($post_title, ENT_COMPAT) . '">' . htmlspecialchars($post_title) . '</a>';
    if($show_excerpts) {
    $post_excerpt = stripslashes($post->post_excerpt);
    $output.= '' . $post_excerpt;
    }
    $output .= $after;

    Anyone?

    I am not familiar with that plugin.
    I am using this one:
    http://www.coffee2code.com/wp-plugins/#customizablepostlistings
    and it has the ability to display date by default.

    I’ve seen that other plugin but really didn’t want to change as I like the MtDewVirus one. I was thinking there had to be an easy way to modify the code I’m already using to do what I want it to do. I mean, all it has to do is pull the date of the post and display it.

    moshu’s suggestion is pretty neat, if you want a no fuss plugin that gives you exactly what you want: date before the post title.

    However, if you download (c2c) and check the coding of their pull for date line, you may see how they do it and then you might be able to intergrate (copy & paste) that section of code into your code?

    I’ve learnt heaps from studying and copy&pasting code bits and pieces from templates, themes and plugins to get the right look and feel for what I want.

    Gotta confess I don’t mind all that fiddling, either. Sometimes

    Thanks for the suggestion Kat! I think I will download the other plugin and take a look at it. If it does what I need it to do with minimal tweaking or fuss, then I suppose that’s the better way to go.

    Normally I would take your advice and download the code and tweak the current plugin I have but I don’t have the time to do that right now. (Dang 3 year olds and their petty demands anyway!) 😉

    Thanks again!

    I’m hearing you loud and clear 🙂 Mine are 15 (turns 16 soon) and 21. All over bar the hooray!

    Well that plugin took a whole 3 minutes to upload and customize and I like it! Thanks for the info and the help Moshu and Kat!

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Adding post date to recent-post plugin’ is closed to new replies.