Skip to content

Early-bird lifetime licence: $199 once, for the first 200 buyers only. See the offer

Current year shortcode

Type [year] anywhere, for example “© [year] My Shop” in the footer, and it always shows the current year.

  • Type PHP
  • Runs Where you put the [year] shortcode
  • Tested with WordPress 7.1
PHP
<?php

echo esc_html( wp_date( 'Y' ) );

How to use it

Type [year] in a post, a page or a Shortcode block.

In these packs

  • Content and media: Shortcodes, links, images and small design touches for the public site.

Move your snippets over this afternoon.

Importing changes nothing until you switch over, and your old shortcodes keep working.