WordPress.org

Ready to get started?Download WordPress

Forums

ShortCodes UI
[resolved] Adding Post Date to some posts (2 posts)

  1. innov8iv
    Member
    Posted 1 year ago #

    My client doesn't want the date on all posts/pages, so I'm trying to figure out a way to use this plug-in.
    Where am I going wrong . . . ?
    I created two shortcodes: the first is an "advanced" type using PHP code and all I have is simply this: the_date('F j, Y') in the PHP area. The shortcode is pd
    Then the other is a simple snippet that has this in the ShortCode template:
    Posted on [pd].
    And the shortcode for that one is pod.
    So, I would expect that anywhere in my post that I put [pod] I should get "Posted on (the actual date the post was published)."

    http://wordpress.org/extend/plugins/shortcodes-ui/

  2. Bainternet
    Member
    Plugin Author

    Posted 1 year ago #

    Not really since the shortcodes are saved as a custom post type then the date of the shortcode creation should be returned.

    also you should use return get_the_date... instead of the_date...

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.