• Resolved bigfatty

    (@bigfatty)


    I’m using the 2024 WP default theme and latest version of Gutenberg and was trying to add a simple dynamic copyright to the footer with website name and current year, but I find a lot of various methods and codes to work with that are confusing…code in the functions file, footer short code, child theme, plugins, etc. Is there just a simple, straightforward method I could use? Thanks for any info.

Viewing 4 replies - 1 through 4 (of 4 total)
  • First install the “Dynamic Year Block” plugin, see: https://www.ads-software.com/plugins/dynamic-year-block/

    Then go to Appearance > Editor > Patterns > Footer. Edit the footer there. Now add the “Site Title” block to display the website name. And add the “Dynamic Year” block. You can still customise both blocks to your requirements.

    Thread Starter bigfatty

    (@bigfatty)

    Thank you for the info. However, I was hoping not to use a plugin. I inserted a copyright in the classic editor years ago using some simple code, and it wasn’t that difficult. I’ve forgotten the method, though, and unsure what of code would now be used for the block based editor.

    Instead of a plugin, you can also write the year yourself. Or you can use a shortcode like this one:

    function custom_year_shortcode () {
     return date_i18n('Y');
    }
    add_shortcode ('year', 'custom_year_shortcode');

    You have to insert it via code snippet plugin or in the functions.php of your child theme. You can then use the shortcode block

    [year]

    at the place where you want it to go.

    Thread Starter bigfatty

    (@bigfatty)

    I can try that. Thank you for the info and the code.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Inserting Copyright into Footer’ is closed to new replies.