Home / Dynamic Year Copyright Shortcode
Duplicate Snippet

Embed Snippet on Your Site

Dynamic Year Copyright Shortcode

This snippet adds an easy-to-use shortcode to display the copyright symbol with the current year.

1.1k
Code Preview
php
<?php
// Copy the Shortcode in the Insertion box below and paste it wherever you want the copyright symbol + year to be displayed.
// This will output © 2023 or the current year automatically.
echo "&#169; " . date( 'Y' );

Comments

Add a Comment

  1. This wont work on my site? I added this code snippet to my site. Copied the short code and placed it in the copyright line of my site. It just shows the shortcode… to test and make sure it wasnt just the copyright ling somehow blocking shortcodes, i also added it to the largest text in the top section (standard wysiwyg text editor section) the shortcode isnt displaying but it isnt showing the year either. Can someone help? https://kravebranding.com/drsd/

    1. Hi Sarah,
      Those sound like 2 separate problems. Firstly, if the shortcode is displayed as text it means the field where you are adding it does not support/execute shortcodes. Secondly, if the shortcode does not output anything in a content area I suggest making sure the snippet is active – even in shortcode mode you can control the output of a snippet using the active state. Please reach out using support form if you want us to help look into this in more detail: https://library.wpcode.com/account/support/