[oceanwp_last_modified] Shortcode

This shortcode allows you to display the last modified date of a single page or blog post, in case you do not wish to include the Modified Date meta option in OceanWP Single Blog Post settings (Customize > Blog > Single Post):


Here is a list of the different parameters:

  • olm_text: If you want to add custom text to be displayed. Default text is: "Last Updated on:".
  • olm_date_format: If you want to choose custom date format. Default format is "F j, Y" which displays the date in a following manner: January 31, 2021.

Learn more about different WordPress date parameters and combinations. This shortcode does not return the time, therefore avoid adding any time parameters.

For example, if you want to add custom last modified text and with a custom date format that will return the day, month, date and the year in two-digit format, insert this shortcode:

[oceanwp_last_modified olm_text="Last modified on" olm_date_format="l, F j, y"]

This shortcode will return the following: Last modified on Monday, January 31, 21

Styling the [oceanwp_last_modified] Shortcode

By default, the shortcode will reserve the paragraph text format (p).

If you wish to style in order to be displayed differently compared to the rest of your text, you can use the ocean-last-modified CSS class, which is already included in the shortcode. Therefore all you need to do is define your style in the Custom CSS area of the Customizer (Customize > Custom CSS/JS).


/* OceanWP Last Modified Shortcode Style */
.ocean-last-modified {
font-size: 16px;
font-weight: 600;

Add other text styling CSS parameters per your need.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.