• 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!

    https://www.ads-software.com/extend/plugins/microkids-related-posts/

Viewing 4 replies - 1 through 4 (of 4 total)
  • I am looking for this too along with the post author. Any assistance would be greatly appreciated.

    Me too!

    frankie_molenaar

    (@frankie_molenaar)

    Me too! Can’t get it to work…

    frankie_molenaar

    (@frankie_molenaar)

    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!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Plugin: Related Posts for WordPress] Displaying post date? For dummies please’ is closed to new replies.