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. hide Sitetittle on a row

hide Sitetittle on a row

Scheduled Pinned Locked Moved General Discussion
6 Posts 2 Posters 116 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.
  • A Offline
    A Offline
    anagase
    wrote last edited by
    #1

    Hello guys! Any idea how to hide the logo in a row, inside a page? Any options? Here’s an example: https://orbital.anagarciasegura.com/ I would like the logo not to appear initially, unless it’s as a logo. I’ve tried making it sticky in the second row, but then I can’t keep it in the following ones. Any ideas?
    Thanks!!!!

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

      ah it is a lay theme site! so basically, this is the page where you would like the logo to not appear?

      I would like the logo not to appear initially, unless it’s as a logo

      I don't understand what you mean with that :(

      do you mean the logo should only appear, once we are scrolled to this position?

      image.png

      ok you can do it like this:

      in lay options -> custom css & html -> custom head content, insert:

      <script>
      window.laytheme.on('newpageshown', function() {
        // CONFIGURATION: Change the class selector here
        const targetSelector = '.showlogo'; 
        const titleSelector = '.sitetitle';
      
        const siteTitle = document.querySelector(titleSelector);
        const triggerElement = document.querySelector(targetSelector);
      
        // If the trigger class doesn't exist on this page, show the logo by default
        if (!triggerElement) {
          if (siteTitle) siteTitle.style.opacity = '1';
          return; 
        }
      
        // Initial state for pages that DO have the trigger element
        if (siteTitle) siteTitle.style.opacity = '0';
      
        const observer = new IntersectionObserver((entries) => {
          entries.forEach(entry => {
            // Logic: If the trigger element is NOT intersecting the top edge 
            // AND its position is at or above 0, it has scrolled past the top.
            if (!entry.isIntersecting && entry.boundingClientRect.top <= 0) {
              siteTitle.style.opacity = '1';
            } else {
              siteTitle.style.opacity = '0';
            }
          });
        }, {
          threshold: 0,
          rootMargin: '0px 0px -100% 0px' 
        });
      
        observer.observe(triggerElement);
      });
      </script>
      

      in the gridder, on the first row where you want your logo to show up, right click the row, click "set html class and id" and as HTML class set:

      showlogo

      you may want to use this css also in lay options -> custom css for desktop:

      .sitetitle {
        opacity: 0;
        transition: opacity 0.3s ease-in-out;
      }
      

      gemini link to explore the code further:

      https://gemini.google.com/app/d8b1498755f9003f

      Please understand i could have written this code myself, but it just helps to use AI so i can answer things faster

      if it doesnt work:
      Can you please send:

      • a link to this forum topic
      • your website address
      • /wp-admin/ username and password
        to: info@laytheme.com
      1 Reply Last reply
      0
      • A Offline
        A Offline
        anagase
        wrote last edited by
        #3

        thanks a lot Armin! at the end I used this code:

        1 Reply Last reply
        0
        • A Offline
          A Offline
          anagase
          wrote last edited by
          #4

          <script>
          window.laytheme.on('newpageshown', function() {
          const logo = document.querySelector('.sitetitle');
          const trigger = document.querySelector('.showlogo');

          if (!logo) return;

          if (!trigger) {
          logo.style.opacity = '1';
          return;
          }

          logo.style.opacity = '0';

          function toggleLogo() {
          const triggerTop = trigger.getBoundingClientRect().top;
          logo.style.opacity = triggerTop <= 0 ? '1' : '0';
          }

          toggleLogo();
          window.addEventListener('scroll', toggleLogo);
          });
          </script>

          1 Reply Last reply
          0
          • A Offline
            A Offline
            anagase
            wrote last edited by
            #5

            Thanks anyway… you helped me a lot. You’re a rockstar — I really appreciate the speed and the interest you show on the forum

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

              thanks a lot! <3

              im glad i could help!

              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

              Our Web Development company: 100k.studio

              Want to tip me? https://www.paypal.com/paypalme/arminunruh

              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