Dynamic Year and Copyright in Customise section

How can I put the Dynamic Year followed by C Copyright notice and Site Name in the customiser section. Thanks

If you use the Listing Hive theme, steps are below:

  1. Use child theme >How to Create a WordPress Child Theme<
  2. Copy the footer.php file from your main theme directory, into your child theme’s root directory.
  3. Open that file.
  4. Search for this code,
<?php if ( get_theme_mod( 'copyright_notice' ) ) : ?>
	<div class="footer-navbar__start">
		<div class="footer-navbar__copyright">
			<?php echo wp_kses_post( get_theme_mod('copyright_notice') ); ?>
		</div>
	</div>
<?php endif; ?>

select, and replace with this:

<?php if ( get_theme_mod( 'copyright_notice' ) ) : ?>
    <div class="footer-navbar__start">
        <div class="footer-navbar__copyright">
            <?php
                $year = date('Y');
                $copyright_notice = get_theme_mod('copyright_notice');
                echo str_replace('{year}', $year, wp_kses_post($copyright_notice));
            ?>
        </div>
    </div>
<?php endif; ?>

  1. Go to the Wordpress dashboard, Appearance → Customize.
  2. Find the “Copyright Notice” field, and if you already have the copyright notice, use this: © {year} yourwebsite.com - All Rights Reserved.
  3. Save and you are ready.
1 Like

Honestly, your help and advice have been a boon in disguise to me. Will try to implement it
Thank you sir so very much.
Will now have to focus on getting the upload media file limit to 500kb and it seems that I have no other option but to get a developer.

Thanks a lot

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.