• Resolved longgewgaw

    (@longgewgaw)


    How to show the current year – example for copyright notice.

    Tried search but couldn’t find anything.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Shea Bunge

    (@bungeshea)

    You can add the following as a Content snippet:

    <?php
    
    echo date( 'Y' );

    Or add a shortcode in a Functions snippet:

    add_shortcode( 'current_year', function () {
        return date( 'Y' );
    } );

    And then include it in your content:

    Copyright ? [current_year]. All rights reserved.

    Thread Starter longgewgaw

    (@longgewgaw)

    Works great, thanks!!!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Show current year’ is closed to new replies.