Aleš Sýkora / November 28, 2023 / 1 comments

Current Year for Copyright in WordPress and Oxygen Builder

Post summary: Today I will show you the easiest way to add a year to your Copyright information. The problem is that you don’t want to change the date every year. It’s easier to get current year with PHP. Use the PHP function date() with format Y to get current year and it will change automatically after…

Today I will show you the easiest way to add a year to your Copyright information. The problem is that you don’t want to change the date every year. It’s easier to get current year with PHP. Use the PHP function date() with format Y to get current year and it will change automatically after new year’s eve.

PHP Function which shows current year:

<?php echo date("Y"); ?>

Show Current year in Oxygen Builder

In Oxygen Builder you can use the Dynamic data > PHP function return value, which generates this shortcode:

[oxygen data='phpfunction' function='date' arguments='Y']
Date function in Oxygen Dynamic Data

Fuel my passion for writing with a beer🍺

Your support not only makes me drunk but also greatly motivates me to continue creating content that helps. Cheers to more discoveries and shared success. 🍻

1 comments

  • Thank you for the specific examples. I now know how to proceed. Again, thank you very much!

Share Your Thoughts