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. open all links in a thumbnail grid in a new tab

open all links in a thumbnail grid in a new tab

Scheduled Pinned Locked Moved General Discussion
9 Posts 2 Posters 162 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.
  • moND0711M Offline
    moND0711M Offline
    moND0711
    wrote on last edited by
    #1

    Hi there,

    is it possible to open all links in a thumbnail grid in a new tab?

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

      why would you want to do that :/ mmh

      <script>
      window.laytheme.on("newpageshown", function(){
      jQuery(".type-thumbnailgrid a.thumb").attr('target', '_blank');
      })
      </script>
      

      maybe this works
      put it in lay options → custom html and css → custom head content

      moND0711M 1 Reply Last reply
      0
      • moND0711M Offline
        moND0711M Offline
        moND0711
        wrote on last edited by
        #3

        @moND0711 said in open all links in a thumbnail grid in a new tab:

        open all links in a thumbnail grid in a new tab

        Hi Armin,
        thanks a lot, it works!

        The thinking was this: On our customer's website there is a rather long "News" page with some thumbnail grids. If the user now clicks on a thumbnail he comes to the single news post. If he wants to go back to the overview he uses the back button in the browser. But then he always ends up at the top of the page. This is a bit inconvenient if the user is actually already browsing further down the page.
        Therefore the consideration to open the thumbnail links always in a new tab. Or there is a solution as described above? That would be of course the most elegant.

        Cheers
        Marc

        1 Reply Last reply
        0
        • arminunruhA arminunruh

          why would you want to do that :/ mmh

          <script>
          window.laytheme.on("newpageshown", function(){
          jQuery(".type-thumbnailgrid a.thumb").attr('target', '_blank');
          })
          </script>
          

          maybe this works
          put it in lay options → custom html and css → custom head content

          moND0711M Offline
          moND0711M Offline
          moND0711
          wrote on last edited by
          #4

          @arminunruh

          Is there is a solution for this:

          On our customer's website there is a rather long "News" page with some thumbnail grids. If the user now clicks on a thumbnail he comes to the single news post. If he wants to go back to the overview he uses the back button in the browser. But then he always ends up at the top of the page. This is a bit inconvenient if the user is actually already browsing further down the page.
          Therefore the consideration to open the thumbnail links always in a new tab. Or there is a solution as described above? That would be of course the most elegant.

          ?

          Best
          Marc

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

            @moND0711 said in open all links in a thumbnail grid in a new tab:

            But then he always ends up at the top of the page.

            Actually that shouldn't happen!
            Its a bug.. working on it now

            moND0711M 1 Reply Last reply
            0
            • arminunruhA arminunruh

              @moND0711 said in open all links in a thumbnail grid in a new tab:

              But then he always ends up at the top of the page.

              Actually that shouldn't happen!
              Its a bug.. working on it now

              moND0711M Offline
              moND0711M Offline
              moND0711
              wrote on last edited by
              #6

              @arminunruh

              Thanks Armin!

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

                i think it should work now if u update and u don't have "compatibility mode" activated

                moND0711M 1 Reply Last reply
                0
                • arminunruhA arminunruh

                  i think it should work now if u update and u don't have "compatibility mode" activated

                  moND0711M Offline
                  moND0711M Offline
                  moND0711
                  wrote on last edited by
                  #8

                  @arminunruh said in open all links in a thumbnail grid in a new tab:

                  compatibility mode

                  All right. This mode ist activated on my website. I'll have to check if all plugins work with deacitvated compatibility mode...

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

                    yea mmh

                    i need to make this work with that mode disabled too…

                    can you not use masonry for your thumbnailgrid?
                    can u disable masonry for a second and see if it works then?

                    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