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. Additional code on Desktop layout only?

Additional code on Desktop layout only?

Scheduled Pinned Locked Moved General Discussion
8 Posts 2 Posters 237 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.
  • R Offline
    R Offline
    R Seance
    wrote on last edited by
    #1

    Hello there,

    I'm adding some additional Javascript to a page on my site, using the dropdown in the editor:

    html.jpg

    The code runs something that is only really worthwhile on desktop, and works fine, but I don't want it to run on mobile. So, I created the custom mobile layout, clicking on the phone icon and choosing "start with empty layout" and created a new design, but the code still runs there on mobile.

    Is there a way to add code this way and have it only work on the desktop version of the same page?

    Thanks!!

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

      Dear @R-Seance

      It could be that you are loading the page in Desktop view and therefore the JS into the browser and reducing the browser size to mobile layout but then the JS is still present?, unsure sorry.

      Would you be able to post your custom HTML/JS and then i can have a better idea and run some tests for you!!! :)

      Interesting question and worth investigating @R-Seance

      Talk soon & best wishes
      Richard

      1 Reply Last reply
      0
      • R Offline
        R Offline
        R Seance
        wrote on last edited by
        #3

        Hey Richard,

        thanks for the reply!

        The JS still runs on my mobile too! Do you have an email I can send code / links to? Just because it's something I'm in the middle of working on for someone.

        Thanks!

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

          Dear @R-Seance

          Sure โœจ
          Send me a message via 'chats' and we can disclose information there - or talk about a more secure email if you wish


          Best
          Richard
          1 Reply Last reply
          0
          • R Offline
            R Offline
            R Seance
            wrote on last edited by
            #5

            Hey Richard, not sure the chat is working, do you have an email I can send stuff to? Thanks!

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

              Dear @R-Seance

              Of course ๐ŸŒsorry that chats isnt working for you!

              richard@laytheme.com

              Talk soon & have a wonderful day
              Richard
              R 1 Reply Last reply
              0
              • RichardR Richard

                Dear @R-Seance

                Of course ๐ŸŒsorry that chats isnt working for you!

                richard@laytheme.com

                Talk soon & have a wonderful day
                Richard
                R Offline
                R Offline
                R Seance
                wrote on last edited by
                #7

                @Richard Hey Richard, just wondering if you got my email?! Thanks!

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

                  Dear @R-Seance

                  I did yes thank you! ๐ŸŒI am looking into it right now :)

                  Will reply as soon as possible, im sorry to keep you waiting and for the delay this week ๐Ÿ™ˆ


                  Sincerely
                  Richard
                  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