Skip to content

General Discussion

A place to talk about anything Lay Theme related
4.4k Topics 18.6k Posts
  • Button to switch visibility of Menu

    4
    0 Votes
    4 Posts
    37 Views
    arminunruhA
    <script> var showDesktop = false; jQuery(document).on("mouseenter click", ".desktopbutton", function(e) { e.stopPropagation(); if( showDesktop ) { jQuery("nav").removeClass("navoff"); }else{ jQuery("nav").addClass("navoff"); } showDesktop = !showDesktop; });

    the touchstart event is triggered at the same time the click event is triggered. you need to read about event propagation, google it

    var showMobile = false; jQuery(".mobilebutton",).on("click", function(e) { e.stopPropagation(); if( showMobile == true ) { jQuery("nav").removeClass("navoff"); }else{ jQuery("nav").addClass("navoff"); } showMobile = !showMobile; }); jQuery(document).on("click", function(event) { // hide desktop and mobile menu // if you dont want these menus to get hidden when clicking on a menu point, // you need to take a look at event.target and see if that element or its parents are part of the menu });

    u probably also only need to add and remove one class: navoff instead of switching out navon, navoff. the navoff class just has opacity: 0;

    i'd recommend you to read a beginners book about jquery to learn how to do things like that or post questions like that on stackoverflow or sth

    i didn't test this code, idk if it really works well. but i don't have time to help you more than that, as its custom coding

  • Buttons greyed out

    2
    0 Votes
    2 Posts
    32 Views
    arminunruhA

    can you send your website address, /wp-admin/ username and password and a link to this topic to info@laytheme.com?

  • Hamburger menu on iPad

    2
    0 Votes
    2 Posts
    39 Views
    arminunruhA

    not possible but it is planned

  • Problem with text alignment

    4
    0 Votes
    4 Posts
    78 Views
    arminunruhA

    sorry!

    see this setting:

    Screenshot 2022-10-11 at 18.48.58.png

  • 0 Votes
    20 Posts
    4k Views
    arminunruhA

    u can find the correct working code here:

    https://laytheme.com/documentation/custom-javascript.html#newpage-events

    <script> var colors = ["#fff", '#000', '#f0f', '#0ff', '#00f', '#ff0', '#0f0'] window.laytheme.on("newpageshown", function(){ var ix = getRandomInt(0, colors.length); var color = colors[ix]; jQuery('#grid, #custom-phone-grid, .cover-region-desktop, .cover-region-phone, #footer, #footer-custom-phone-grid').css('background-color', color); }); // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/random // Returns a random integer between min (included) and max (excluded) function getRandomInt(min, max) { min = Math.ceil(min); max = Math.floor(max); return Math.floor(Math.random() * (max - min)) + min; } </script>

    @Giammi
    read the text at the link above, u can find out how to do that there

  • Change text style on marquee hover

    2
    0 Votes
    2 Posts
    57 Views
    B

    Found a solution :)

    If someone has the same problem:

    ._MarqueeSmall_no_spaces:hover{ -webkit-text-stroke: 2px #FFFFFF; color: transparent; transition: 0.25s ease-in-out; } ._MarqueeSmall_no_spaces{ color: white; -webkit-text-stroke: unset; }

    this works perfectly fine for me :)

  • This topic is deleted!

    1
    0 Votes
    1 Posts
    9 Views
    No one has replied
  • Trouble adding a font family using CSS

    4
    0 Votes
    4 Posts
    72 Views
    F

    Hey Armin ! I figured it out in the end :
    First I think there was an issue with the fact that I was using a space in the name of the font. Then I only used .woff2 as mentioned here. Here's the code input now for people that need it. This is both in the custom CSS and the file.css supplied to the Add by "<link>" tag and CSS webfonts option of LayTheme.

    @font-face { font-family: 'GTAmerica'; src: url('/wp-content/themes/fonts/gtamerica/GT-America-Standard-Ultra-Light.woff2') format('woff2'); font-weight: 100; font-style: normal; font-display: swap; } @font-face { font-family: 'GTAmerica'; src: url('/wp-content/themes/fonts/gtamerica/GT-America-Standard-Thin.woff2') format('woff2'); font-weight: 200; font-style: normal; font-display: swap; }

    etc. for the rest of the family fonts.

    Then in the import options :

    Font name : GTAmerica Link tag : <link href="https://triplesine.com/wp-content/fonts/gtamerica/gtamerica.css" rel="stylesheet" type="text/css"> "font-family" CSS: font-family:'GTAmerica';

    Maybe this can be added as a mini tutorial on the Lay website ?
    Thanks to everyone at Lay Theme for this great theme : )

  • multiple modals with project-specific texts

    3
    0 Votes
    3 Posts
    64 Views
    E

    @arminunruh

    thank you for your quick response! these are all great tips which i have not thought about yet. i will go for the "get by id" function.

    great support as always.

    merci :)

  • HTML5 videos from mp4

    4
    0 Votes
    4 Posts
    155 Views
    arminunruhA

    yes please send your login details as I said,
    also send your ftp login please

  • Change background colour upon refresh

    6
    0 Votes
    6 Posts
    523 Views
    arminunruhA

    hey if anyone wants to do this: use this code

    <script> var colors = ["#fff", '#000', '#f0f', '#0ff', '#00f', '#ff0', '#0f0'] window.laytheme.on("newpageshown", function(){ var ix = getRandomInt(0, colors.length); var color = colors[ix]; jQuery('#grid, #custom-phone-grid, .cover-region-desktop, .cover-region-phone, #footer, #footer-custom-phone-grid').css('background-color', color); }); // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/random // Returns a random integer between min (included) and max (excluded) function getRandomInt(min, max) { min = Math.ceil(min); max = Math.floor(max); return Math.floor(Math.random() * (max - min)) + min; } </script>
  • Avif/Webp support

    3
    0 Votes
    3 Posts
    70 Views
    arminunruhA

    ah nice :)

  • Nice MP3 player working with LAY theme

    2
    0 Votes
    2 Posts
    45 Views
    arminunruhA

    i dont know :/

  • Menu and submenu to fixed it

    2
    0 Votes
    2 Posts
    37 Views
    arminunruhA

    hey!

    i see you have a submenu inside a submenu

    i haven't tested that yet

    i can click on the submenus

    try these options:
    customize -> menu styles -> submenu -> Show submenu on: "Click" or "always show"

    make sure u have updated lay theme, these are new settings

    does that help?

    also you can use a different textformat for the menu and for the submenu there in the customizer to have different looking texts for both

  • gridder

    4
    0 Votes
    4 Posts
    63 Views
    V

    @arminunruh superbe! thank you

  • Menu Display

    3
    0 Votes
    3 Posts
    35 Views
    arminunruhA

    but also i will include this option for the next update and you should use that so the spacing works correctly:
    Screenshot 2022-09-27 at 15.33.45.png

  • Hover thumbnail mobile with touch only

    9
    0 Votes
    9 Posts
    98 Views
    arminunruhA

    still on my list :I

  • This topic is deleted!

    1
    0 Votes
    1 Posts
    1 Views
    No one has replied
  • THIS IS HOW YOU MAKE AN ACCORDION

    2
    0 Votes
    2 Posts
    123 Views
    arminunruhA

    :DDD
    i will also create an accordion element one day

  • Best way to create Dropdown/Accordion?

    6
    0 Votes
    6 Posts
    228 Views
    arminunruhA

    hey aaron

    super busy, if you like email me at info@laytheme.com and i can do this for some €€, maybe theres more custom coding u want for that website and yea

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