How can I add the current date to a page

Is there an easy way to add the current date to a page with cornerstone (x-theme). I am using a page to show that i posted something, and I want the date to show.

For example the following code will display the date.

<?php echo date(get_option(‘date_format’)); ?>

But I cannot see where to add it without the date showing up on all pages.

Hello @masel1951,

Thanks for writing to us.

In case if you want to display the current date you can use the dynamic content code in the Cornerstone builder.
{{dc:global:date format="F j, Y"}}

In case if you want to display any post publish date. You can use Publish Date dynamic content.

Front-Page-Content-X (5)

Hope it helps

The list of globals and the round box does how seem to show on my version of cornerstone. How can I enable it

Hello @masel1951,

Can you please confirm that you have updated to the latest versions? Our latest versions are:

  • X theme 8.3.3
  • Cornerstone 5.3.3
  • WordPress 5.7.2
  • PHP 7.4

This latest release contains fixes for several issues so be sure to check out the changelog:

After doing the updates, always remember to clear all caches (if you are using WP Rocket, WP SuperCache or W3 Total Cache) when updating so that the code from the latest release is always in use. This will help you to avoid any potential errors.

If after updating you are still not seeing the Global Current Date dynamic content, provide us access to your site so that we can check your settings. Please create a secure note with the following info:
– Link to your site
– WP login URL
– WP username
– WP password
– WP Administrator Role
- Confirmation that we can access and make changes to your site

To know how to create a secure note, please check this out: How The Forum Works

Please let us know how it goes.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.