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. Organizing Tag filters

Organizing Tag filters

Scheduled Pinned Locked Moved General Discussion
2 Posts 2 Posters 79 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.
  • D Offline
    D Offline
    Domenic Driessen
    wrote on last edited by
    #1

    Re: Organizing tags in the Tag Filter

    Hey there, I've been playing around with a new Layout for my website. The Tag Filter should play a central role in navigating my portfolio page. There are certain categories you can access through the tag filter.

    I had the same issue as in the post linked before. The Tags would reorganize themselves when clicking a filter option. The active one is pushed to the top and the other ones are appended at the bottom again.
    I would like them to stay in place and – if possible – have them organized through checkboxes. You can see an example in the pictues appended. (the second one just for visualization of the checkboxes... these are actually just text blocks that do nothing)

    Bildschirmfoto 2023-03-08 um 15.39.19.png

    Bildschirmfoto 2023-03-08 um 15.39.41.png

    When loading the page all boxes should be checked... To achieve this I wrote this code:

    document.addEventListener('DOMContentLoaded', function() {
      var tagBubbles = document.querySelectorAll('.tag-bubble.lay-filter-visible');
      for (var i = 0; i < tagBubbles.length; i++) {
        tagBubbles[i].classList.add('lay-tag-active');
      }
    });
    

    But whenever I click on a project thumbnail, the page is reloaded and the code is reset...

    I managed to append checkboxes though javascript but they would disappear when I click a project tumbnail or a filter.
    wrote this code to troubleshoot and it would fire only once when first clicking a filter. It seems like everthing is reset somehow whenever an action fires??

        jQuery(document).on("click", ".tag-bubble", function(event) {
        	console.log("yay!");
        });
    

    Enabled Ajax compatibility mode but it doesn't make a difference.

    Maybe I'm having the wrong ideas on how to implement scripts in laytheme here, but maybe you have some ideas. :)

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

      hey so you dont want tags to re-order when clicking on them
      and you want all of them to be active at the same time in the beginning

      mmmh

      im not sure i can help you with this :/

      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
      A
      alasdair17
      C
      clnstz
      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