Skip to main content

Year shortcode for footer credits in Brizy Cloud

Comments

8 comments

  • Alex

    Hi,

    I added this to the list, but I'm not sure when or if it will be added. I'll discuss this with the team.

    Meanwhile, you can do that with HTML&JS and put the code in an Embed element. Here's an article that can help you: https://kerstinmartin.com/blog/copyright-notice

    -1
  • Turnkey Webmaster

    Hey that's cool, I'll try it out! Thank you!

    0
  • Alex

    I'm happy to help ;)

    0
  • Scott Washburn

    The linked website's solution worked for me. Thank you!

    0
  • Ritesh Saini

    Hi, it's been two years, but there is still no shortcode or any way to dynamically show the date or year in the text block. Any ETA?

    Embed block is a temporary solution, but it doesn't work in all scenarios because you need to then add custom CSS to style the text according to the site.

    1
  • KC George

    Hi Ritesh,

    Using the Embed element is the only solution at the moment. Please try this code in the footer using the Embed element

    <style> div {text-align: center;} </style>
    Copyright ©
    <span id="footer-year"></span>
    <img src="/error_source.jpg" style="display: none;" onerror="document.getElementById('footer-year').textContent = new Date().getFullYear();">
    Brizy.io. All rights reserved

    To set style, you can add this CSS

    .brz .brz-embed-code .brz-embed-content {
    font-family: sans-serif;
    font-size: medium;
    font-weight: normal;
    color: #ff380b;
    }
    0
  • Sportsman Creative

    Hello, is this still the case or has Brizy introduced any other solution for this since then?

    Thanks!

    0
  • Ariel H.

    Hello,

    Thank you for reaching out.

    Yes, this solution is still current. It remains the recommended approach, as using document.write() to display the current year can break the website and is not advised.

    Alternatively, you can also safely use the following method to display the current year without causing issues:

    <style>
      div { text-align: center; }
    </style>

    Copyright ©
    <span id="footer-year"></span>
    Brizy.io. All rights reserved

    <script>
      document.getElementById('footer-year').textContent = new Date().getFullYear();
    </script>

    Please let us know if you have any questions or need further clarification.

    Kind regards,
    Ariel H.

    0

Please sign in to leave a comment.