How to Add Post Date to Blogs Directory

There does not appear to be a Site Directory setting to display the date of a post. Am I missing something?

If not, can anyone suggest a hack to have the plugin show the date of the most recent blog post for each site in the list of posts?

If not, please consider this a feature request to show the date of posts or add an option in the settings to do so. An option to show the post title would be just peachy too.

To clarify, the Blogs Directory currently shows the avatar, blog title and tagline in the list of recent posts. I'm looking for a way to show the date of the most recent blog post for each site in the list. Our Tripawds Blogs Directory is very frequently updated, and often used by members to catch up on blogs. We've received a few requests to have each blog post include the date shown in the directory, and one suggestion to include the post title. I think these are valid requests, making the Directory more helpful, but don't see any way to do that via settings in the current version.

Thanks for the good help!

  • Kasia Swiderska
    • Support nomad

    Hello jcnjr,

    I'm afraid I don't see any requests for that feature on forum thus there is no ready to use code snippet I could provide and by quick look on the plugin code that change is bit too complex for me :slight_frown:

    I will check with developer if this can be done and get back to you as soon I'll get update.

    I will also move your thread to features and feedback forum - so we can see if this feature will get much support from other members.

    kind regards,

  • Kasia Swiderska
    • Support nomad

    Hello jcnjr,

    Got code from developer - it requires plugin code change. In blogs-directory.php file replace line 426 with this

    $blog_title = get_blog_option( $blog['blog_id'], 'blogname', $blog['domain'] . $blog['path'] ).' ('.__(' Last update: ','blogs-directory').date("jS F, Y", strtotime($blog['last_updated'])).')';

    You can change date format to one that will fit your needs from jS F, Y by following guide here

    This code will show date of latest blog update. Let me know if this is what you are looking for.

    kind regards,

  • jcnjr
    • HummingBird

    Finally had a chance to implement this...nice. Thank You!

    For anyone interested: I wanted the date a bit more discreet, so I edited line 450 instead to put the date on a new line after the description. I'm not sure the code is the cleanest, but I finally got it looking acceptable...
    $blogdescription = get_blog_option( $blog['blog_id'], 'blogdescription', $blog['domain'] . $blog['path'] ).' <br>'.__('UPDATED: ','blogs-directory').date(&quot;jS F, Y&quot;, strtotime($blog['last_updated'])).''; // EDITED TO SHOW DATE //

    Now, if only I could adjust the avatar size...I edited the instances of "32, $avatar_default" to "48, $avatar_default" but they still render at 27. :-\

    Anyway, thanks again for the direction on this!

  • Rupok
    • Support Ninja

    Hi jcnjr,

    I edited the instances of "32, $avatar_default" to "48, $avatar_default" but they still render at 27

    This is really weird and should not happen. I just checked this in my test multisite and when I changed this:
    get_blog_avatar($blog['blog_id'], 32, $avatar_default)
    with this:
    get_blog_avatar($blog['blog_id'], 64, $avatar_default)
    Larger avatars were being shown in my Sites page. Can you please provide your Sites Directory page URL so we can check this issue in action?

    I could tell you better about the issue if I could see it live, check your current configuration and make some tests on your site. Would you mind allowing Support Access so we can have a closer look at this?

    To enable support access you can follow this guide here:

    Please confirm here when you are done granting Support Access. I'm looking forward to hearing from you and resolving this issue as soon as possible.

    Have a nice day. Cheers!

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.