WordPress.org

Forums

MailPoet Newsletters
[resolved] Date of post (5 posts)

  1. stevem
    Member
    Posted 10 months ago #

    We want to send out a weekly digest of the previous week's posts. Is there any way of adding the date that each post was written? The only shortcode that I can see gives the date of the newsletter rather than the date of the post.

    https://wordpress.org/plugins/wysija-newsletters/

  2. MailPoet Staff
    Member
    Plugin Author

    Posted 10 months ago #

    Hi Stevem,

    Unfortunately there's no way to insert the date of the post on our editor, I'm sorry, seems like we missed this feature :_(

  3. stevem
    Member
    Posted 10 months ago #

    In fact I found a simple workaround by hijacking the Author field. I realise that this is not a permanent solution since it will disappear at the next update. But I hope that that update will offer a date of post option.

    Just one line needs editing in wysija-newsletters/helpers/articles.php. On line 237 replace
    $content .= $author_name;
    by
    $content .= "<em>".$author_name." on ".get_the_time('Y-m-d' , $post['ID'])."</em>";

    Clearly 'Y-m-d' can be replaced by any format including the current option get_option( 'date_format' )

    I also put Posted by instead of Author: when editing the Newsletter template. The result is
    Posted by xxx on 2014-06-20

  4. fuchsws
    Member
    Posted 7 months ago #

    Is there any timeframe when this feature will be added? I do not want to hack the plugin code ...

  5. MailPoet Staff
    Member
    Plugin Author

    Posted 7 months ago #

    No, we're in the middle of a plugin rewrite and we don't have a timeframe for when this feature will be done, I'm sorry!

Reply

You must log in to post.

About this Plugin

  • MailPoet Newsletters
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic