Skip to content
  • Recent
  • Tags
  • Popular
  • Users
  • Search
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse

Lay Theme Forum

  1. Home
  2. General Discussion
  3. Auto-updating copyright year in the footer

Auto-updating copyright year in the footer

Scheduled Pinned Locked Moved General Discussion
7 Posts 4 Posters 1.0k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Z
    Z
    zochovsky
    wrote on last edited by
    #1

    Hey guys,

    Is there any simple way to add an auto-updating copyright year into the Laytheme’s text editor to read, ie. ”© 2020 Laytheme.com All rights reserved.”?

    Thanks

    1 Reply Last reply
    0
    • mariusjopenM
      mariusjopenM
      mariusjopen
      Global Moderator
      wrote on last edited by
      #2

      Dear @zochovsky
      you could do that with jQuery and append.

      Best!

      Marius

      www.mariusjopen.world

      1 Reply Last reply
      0
      • dafvD
        dafvD
        dafv
        wrote on last edited by
        #3

        @mariusjopen and @arminunruh
        I know this is an old post, but I'm trying to do the same, however like this "© 2018—2023" in a Footer page.
        I have a text box inside the footer with the following source code:

        <p>© 2018—<span id="currentYear"></span></p>
        

        And i'm adding some custom JS in "Custom HTML at bottom":

        <script>
             window.laytheme.on("newpageshown", function(){
                jQuery("#currentYear").text((new Date).getFullYear() );
             });
        </script>
        

        This is working perfectly on desktop, however I can't seem to make it work on mobile. It's just shows "© 2018—".
        I already tried a few things but without success. Do you have any idea how to fix this?

        Here's the link if you want to check it —> https://aaltar.com/homepage-2023/

        1 Reply Last reply
        0
        • arminunruhA
          arminunruhA
          arminunruh
          Global Moderator
          wrote on last edited by arminunruh
          #4

          i think id's are meant to be unique maybe thats why it doesnt work

          try

          <p>© 2018—<span class="currentYear"></span></p>
          

          both in your desktop layout and your custom phone layout
          and then

          <script>
               window.laytheme.on("newpageshown", function(){
                  jQuery(".currentYear").text((new Date).getFullYear() );
               });
          </script>
          
          dafvD 1 Reply Last reply
          0
          • arminunruhA arminunruh

            i think id's are meant to be unique maybe thats why it doesnt work

            try

            <p>© 2018—<span class="currentYear"></span></p>
            

            both in your desktop layout and your custom phone layout
            and then

            <script>
                 window.laytheme.on("newpageshown", function(){
                    jQuery(".currentYear").text((new Date).getFullYear() );
                 });
            </script>
            
            dafvD
            dafvD
            dafv
            wrote on last edited by
            #5

            @arminunruh I tried this, however, as soon as I change the source code of the text box to 'class' and click OK, the source code changes (automatically) to '<p>© 2018—</p>'. It completely removes the span tag if there's a class instead of an id...I don't know why.

            Is there another solution for this?

            1 Reply Last reply
            0
            • arminunruhA
              arminunruhA
              arminunruh
              Global Moderator
              wrote on last edited by arminunruh
              #6

              i think id's are meant to be unique maybe thats why it doesnt work

              try

              HTML:

              <p class="currentYear">test</p>
              

              JS:

              <script>
                   window.laytheme.on("newpageshown", function(){
                      jQuery(".currentYear").text("© 2018—" + (new Date).getFullYear() );
                   });
              </script>
              
              dafvD 1 Reply Last reply
              0
              • arminunruhA arminunruh

                i think id's are meant to be unique maybe thats why it doesnt work

                try

                HTML:

                <p class="currentYear">test</p>
                

                JS:

                <script>
                     window.laytheme.on("newpageshown", function(){
                        jQuery(".currentYear").text("© 2018—" + (new Date).getFullYear() );
                     });
                </script>
                
                dafvD
                dafvD
                dafv
                wrote on last edited by
                #7

                @arminunruh I think it was because the span tag was empty. It works now!!
                Thank you so much!

                1 Reply Last reply
                0

                Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                With your input, this post could be even better 💗

                Register Login
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                Online Users
                L
                lukas123
                Forgot your key, lost your files, need a previous Lay Theme or Addon version? Go to www.laykeymanager.com
                laytheme.com
                • Login

                • Don't have an account? Register

                • Login or register to search.
                • First post
                  Last post
                0
                • Recent
                • Tags
                • Popular
                • Users
                • Search