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. Hirarchie on Mobile

Hirarchie on Mobile

Scheduled Pinned Locked Moved General Discussion
ordermobilehirarchie
13 Posts 3 Posters 2.3k 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.
  • arminunruhA Offline
    arminunruhA Offline
    arminunruh
    Global Moderator
    wrote on last edited by arminunruh
    #2

    Hey! From left, to right in desktop view, everything is stacked up on top of each other in the phone view by default. Theres no way to change that behaviour.

    I 1 Reply Last reply
    0
    • arminunruhA arminunruh

      Hey! From left, to right in desktop view, everything is stacked up on top of each other in the phone view by default. Theres no way to change that behaviour.

      I Offline
      I Offline
      idanshe
      wrote on last edited by
      #3

      @arminunruh oh ok.. shame. but thanks anyway!!

      1 Reply Last reply
      0
      • I Offline
        I Offline
        idanshe
        wrote on last edited by
        #4

        Hey Armin, is it possible then to make a page which will automatically direct you to it if you surf on mobile or a tablet?
        THANKS!!

        I 1 Reply Last reply
        0
        • I idanshe

          Hey Armin, is it possible then to make a page which will automatically direct you to it if you surf on mobile or a tablet?
          THANKS!!

          I Offline
          I Offline
          idanshe
          wrote on last edited by
          #5

          @arminunruh so i'm trying to do something like this:

          window.location.replace("http://idansher.com/mobile/");

          but it's somehow doesn't work. do you know why? or there is another way to do it?

          thanks a lot!

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

            Hey!
            Can you explain what happens? "somehow doesnt work" is a bit vague

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

              Does nothing show up? Or does it just stay on the same page? If you like you can pm me the login data of your site and I can take a look.

              1 Reply Last reply
              0
              • I Offline
                I Offline
                idanshe
                wrote on last edited by
                #8

                I land on the same page

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

                  Ok, well you did put your script in the mobile css field. However, that's javascript and it wont execute in a <style> tag.
                  I put this into Lay Options -> Misc Options -> Custom <head> content:

                  <script>
                      var isTouchDevice = navigator.userAgent.match(/(iPhone|iPod|iPad|Android|playbook|silk|BlackBerry|BB10|Windows Phone|Tizen|Bada|webOS|IEMobile|Opera Mini)/);
                      if(isTouchDevice){
                          if(window.location != "http://idansher.com/mobile/"){
                              window.location = "http://idansher.com/mobile/";
                          }
                      }
                  </script>
                  

                  This will redirect to the /mobile/ page when you are visiting the site with a touchdevice.

                  I think the better solution would be to layout your projects so the headline, image and description all follow the same order, that when stacked on top of each other in the mobile view it's logical.

                  Once you did that, then you can use the x-offset functionality (Elements with Offsets – http://laytheme.com/how-to-use.html) to offset your elements in a way that they switch positions. Remember, you won't actually drag and drop around the elements to change their order, you will only use x-offsets to do that.

                  Because in the mobile view, x-offsets are not used, you will still have the logical order in mobile view.

                  1 Reply Last reply
                  1
                  • I Offline
                    I Offline
                    idanshe
                    wrote on last edited by
                    #10

                    wow @arminunruh thanks a lot thats great!!

                    1 Reply Last reply
                    0
                    • D Offline
                      D Offline
                      dnz
                      wrote on last edited by
                      #11

                      Hey Armin,

                      I'm highjacking this thread because I came across a problem I couldn't wrap my head around.

                      I want everyone that visits my site to be automatically redirected to a certain page that is not my standard desktop front page. So I tried your code you posted above and it works fine. It's just that it obviously applies the redirect to every link on that "mobile front page". So let's say I click the link to my "info" page it takes me back to the "mobile front page" I set the redirect to. Is there any chance to apply the redirect only on the front page (so e.g. if some enters via domain.de but NOT if someone enters via domain.de/info). Or is there a way to include multiple URLs that get checked by that JS string?

                      Thanks, man!

                      Best regards,
                      Dennis

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

                        Hey dnz, hmmm how about this?

                        <script>
                            var isTouchDevice = navigator.userAgent.match(/(iPhone|iPod|iPad|Android|playbook|silk|BlackBerry|BB10|Windows Phone|Tizen|Bada|webOS|IEMobile|Opera Mini)/);
                            if(isTouchDevice && window.location == "http://idansher.com"){
                                    window.location = "http://idansher.com/mobile/";
                            }
                        </script>
                        

                        So here you would only go to http://idansher.com/mobile/ if the exact url you are on is "http://idansher.com"

                        1 Reply Last reply
                        0
                        • D Offline
                          D Offline
                          dnz
                          wrote on last edited by
                          #13

                          Hey Armin,

                          Perfect! Thanks a ton!

                          Best regards,
                          Dennis

                          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