Current Year
Outputs the current year. Insert it with the snippet shortcode anywhere you need a year that updates itself, such as a footer notice.
Opens WPIDE on
Code
echo esc_html( wp_date( 'Y' ) );
Notes
Copy the snippet shortcode from the editor after saving.
How to add this snippet
- Install WPIDE on your WordPress site (it is free) and open Code Snippets.
- Use snippet above adds it from the library in one click. Or copy the code into a new snippet with the same code type.
- It is added inactive: review the code and settings, then switch it on.