WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. David M.
    Member
    Posted 2 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!

    http://wordpress.org/extend/plugins/microkids-related-posts/

  2. dadvan
    Member
    Posted 1 year ago #

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

  3. ldsphilosopher
    Member
    Posted 1 year ago #

    Me too!

  4. frankie_molenaar
    Member
    Posted 1 year ago #

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

  5. frankie_molenaar
    Member
    Posted 1 year 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

About this Topic

Tags