WordPress.org

Ready to get started?Download WordPress

Forums

Display Posts Shortcode
[resolved] How to show the time of the post? (3 posts)

  1. slm2011
    Member
    Posted 2 years ago #

    I am using this:

    [display-posts category="mycategory" posts_per_page="1" include_date="true" order="DESC" orderby="date"]

    And would like to add the post "time" as well.

    Is this possible?

    http://wordpress.org/extend/plugins/display-posts-shortcode/

  2. Bill Erickson
    Member
    Plugin Author

    Posted 2 years ago #

    Yes, this is possible, but it will require writing an output filter to add the time. Add this to your theme's functions.php file

    https://gist.github.com/1608325

  3. slm2011
    Member
    Posted 2 years ago #

    Thank you - this worked!

    I now use the following shortcode:
    [display-posts category="mycategory" posts_per_page="1" include_date="true" include_time="true" order="DESC" orderby="datetime"]

    Which now displays the post, followed by the date and the time of the post.

    Thanks again,

    -Sean

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic