Related Posts for WordPress
Displaying post date? For dummies please (5 posts)

  1. David M.
    Posted 4 years ago #

    Hi. Thanks for this brilliant plugin: it makes providing a backstory for your posts a breeze.

    I'd like to display the related posts with title and date. I know that can be done with the API, but I'm quite new to WP, no knowledge of PHP (finding out stuff as I move forward), and failed miserably trying to write code for that.

    I thought it would be something like:

    <?php $my_related_posts = MRP_get_related_posts( $post->ID, true );
    $related_post_date = $my_related_posts->post_date;
    echo $related_post_date; ?>

    But it's not working, probably due to my utter ignorance of PHP syntax.

    Could someone tell me how to get the post date and display it? Thanks!


  2. dadvan
    Posted 3 years ago #

    I am looking for this too along with the post author. Any assistance would be greatly appreciated.

  3. ldsphilosopher
    Posted 3 years ago #

    Me too!

  4. frankie_molenaar
    Posted 3 years ago #

    Me too! Can't get it to work...

  5. frankie_molenaar
    Posted 3 years ago #

    Ok i got it to work but it's very guerrilla hard-coded and definately not a proper solution but i just needed it to work, fast so here's what i did:

    In microkids-related-posts.php i replaced line 658 with

    $output .= mysql2date('j F Y', $related_post->post_date) . " - <a href=\"".get_permalink( $related_post->ID )."\">".$related_post->post_title."</a>";

    Now this is also if you don't use the thumbnails, then you have to edit line 655 i suppose.

    Anyway, like i said this is in no way a proper solution but im not a very experienced programmer but it works until a more permanent solution comes up!

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Related Posts for WordPress
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic