Skip to content
  • Recent
  • Tags
  • Popular
  • Users
  • Search
Skins
  • Light
  • 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. Tag Order

Tag Order

Scheduled Pinned Locked Moved General Discussion
7 Posts 4 Posters 150 Views
  • 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.
  • ffingerF Offline
    ffingerF Offline
    ffinger
    wrote on last edited by
    #1

    Hey!

    is it somehow possible to change the order of the tags shown underneath a project thumbnail? I looked up the version history of laytheme (see below) and it says it's possible, but I can't figure out how. When I add tags to a project, it would always get ordered alphabetically, no matter in what order I enter them.

    The Changelog/Version History of Laytheme says:
    3.9.1 - 19 September 2021
    When editing Tags you can change their order to change the order of tags underneath Project Thumbnails

    https://www.felixfinger.de

    1 Reply Last reply
    1
    • RichardR Offline
      RichardR Offline
      Richard
      Global Moderator
      wrote on last edited by Richard
      #2

      Dear Felix

      @ffinger

      When testing I can change the Tag order within > Projects > Tags:

      Screen Shot 2021-12-09 at 8.41.02 AM.png


      This order will be reflected on both the Gridder and Front-end:

      Screen Shot 2021-12-09 at 8.42.54 AM.png

      Screen Shot 2021-12-09 at 8.43.16 AM.png


      Best wishes ā­ļø
      Richard
      1 Reply Last reply
      1
      • ffingerF Offline
        ffingerF Offline
        ffinger
        wrote on last edited by
        #3

        oohh got it, thanks a ton @Richard ! :) works perfectly.

        https://www.felixfinger.de

        1 Reply Last reply
        0
        • RichardR Offline
          RichardR Offline
          Richard
          Global Moderator
          wrote on last edited by
          #4

          Thanks @ffinger , Have a wonderful day! 🌻

          1 Reply Last reply
          0
          • R Offline
            R Offline
            robsdonatini
            wrote on last edited by
            #5

            Hello, I re-open this thread because I see tag order don't work for me.

            I've got a lot of tags, and when I tried to re-order them (having numbers before words) it works only on certain number values, and not with others, even if in the tags page numbers appears as first.

            Here a pic of how I sorted them, but still in this page they appears sometimes in the middle of 3 tags line https://landcho.eu/all-projects/

            Schermata 2025-08-08 alle 10.25.30.png

            I used this code in custom head content:

            <script defer>
            if (window.location.pathname.includes("all-projects")) {
            document.addEventListener("DOMContentLoaded", function () {
            const thumbnails = document.querySelectorAll(".below-image");

              thumbnails.forEach(function (thumb) {
                const tags = thumb.querySelectorAll(".thumbnail-tags span");
                if (!tags.length) return;
            
                const tagArray = Array.from(tags);
            
                // Ordina: numerici prima, poi alfabetici
                tagArray.sort((a, b) => {
                  const aIsNumber = /^\d/.test(a.textContent.trim());
                  const bIsNumber = /^\d/.test(b.textContent.trim());
            
                  if (aIsNumber && !bIsNumber) return -1;
                  if (!aIsNumber && bIsNumber) return 1;
                  return a.textContent.localeCompare(b.textContent);
                });
            
                const tagContainer = thumb.querySelector(".thumbnail-tags");
                if (tagContainer) {
                  tagContainer.innerHTML = "";
                  tagArray.forEach(tag => tagContainer.appendChild(tag));
                }
              });
            });
            

            }
            </script>

            but it works only when I refresh the page, not when I arrive there directly.
            Any suggestions for how to fix it? @arminunruh maybe?

            Thanks!

            Roberta

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

              Can you please send:

              • a link to this forum topic
              • your website address
              • /wp-admin/ username and password
                to: info@laytheme.com

              seems like u changed the password
              i wanna see why this happens this shouldnt happen

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

                for javascript like that you need to wrap it in

                window.laytheme.on("newpageshown", function(){
                ...
                })

                1 Reply Last reply
                0
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                I also code custom websites or custom Lay features.
                šŸ’æ Email me here: šŸ’æ
                info@laytheme.com

                Before you post:
                1. When using a WordPress Cache plugin, disable it or clear your cache.
                2. Update Lay Theme and all Lay Theme Addons
                3. Disable all Plugins
                4. Go to Lay Options → Custom CSS & HTML, click "Turn Off All Custom Code", click "Save Changes"

                This often solves issues you might run into

                When you post:
                1. Post a link to where the problem is
                2. Does the problem happen on Chrome, Firefox, Safari or iPhone or Android?
                3. If the problem is difficult to explain, post screenshots / link to a video to explain it
                Online Users
                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