Shortcodes to Show Expiration Date

You can use shortcodes to show the expiration date inside your posts.

The default shortcode is [postexpirator]. This will show the expiration date. In the image below, you can see the output from that shortcode:

Postexpirator Shortcode
Postexpirator Shortcode

You can customize this output with three extra formatting options.


type

You can use ‘type” as a format. For example: [postexpirator type=date]

The valid options are “full, “date”, and “time”. The default is full.

[postexpirator type=date] will show only the expiration date. [postexpirator type=time] will show only the expiration time.


dateformat

The format set here will override the value set on the settings page. For example, [postexpirator dateformat=l F jS, Y]


timeformat

The format set here will override the value set on the settings page. [postexpirator timeformat=g:ia]

Professional publishing plugins for WordPress! Get PublishPress

  • SUBSCRIBE TO OUR NEWSLETTER
  • SEARCH THIS SITE