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. Anchor tags from main menu (one-page site)

Anchor tags from main menu (one-page site)

Scheduled Pinned Locked Moved General Discussion
8 Posts 4 Posters 439 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.
  • Z Offline
    Z Offline
    zippitybop
    wrote on Mar 14, 2019, 11:11 AM last edited by
    #1

    Hi again,

    I have another issue -

    I'm trying to use anchor links to scroll to sections, but its not working - I have tried this method

    and also via the page editor > right click > edit html class and id > id.

    In both cases I have added a custom link in the menu with the id #lokaleveranstalter in the url.
    Either way, when I click on the menu item it opens a new window to the URL and doesn't scroll to the section. If I enter the full URL with anchor link and press enter whilst the page has already loaded, it teleports to that section.

    How can I stop the new tab opening and is there a way to make the transition a little more fluid?

    This thread is close to what I want to do, but I'm not sure how to integrate the functionality into the menu items.

    Can you help with this?

    Cheers,
    Darius

    1 Reply Last reply
    0
    • M Offline
      M Offline
      mariusjopen
      Global Moderator
      wrote on Mar 15, 2019, 12:31 PM last edited by
      #2

      Dear @zippitybop
      in the first example you showed, there is a jQuery code which you also need to use?
      Did you use that?

      Best!

      Marius

      www.mariusjopen.world

      1 Reply Last reply
      0
      • Z Offline
        Z Offline
        zippitybop
        wrote on Mar 20, 2019, 10:40 AM last edited by
        #3

        HI Marius,

        thanks so much for getting back to me. Unfortunately (fortunately?) we decided against a menu all together since the page was so short.

        If I get time I will test out what you suggested. But for now the page has gone live without a menu!

        Thanks again,
        Darius

        1 Reply Last reply
        0
        • M Offline
          M Offline
          mariusjopen
          Global Moderator
          wrote on Mar 21, 2019, 10:11 AM last edited by
          #4

          Dear @zippitybop
          sure. no problem.
          Have a good day!

          Marius

          www.mariusjopen.world

          1 Reply Last reply
          0
          • A Offline
            A Offline
            andsampson
            wrote on Mar 27, 2019, 11:19 AM last edited by andsampson Mar 27, 2019, 7:19 AM
            #5

            Hi @mariusjopen ! I am also trying to get a custom link to an anchor on a one-pager to stop opening in a new window. I know I need to get Lay Theme to remove the "target=_blank" part of the created <a> tag, but how do I accomplish this ?

            Anchor linking to site sections in the footer works just fine: the transition is smooth and joyful.
            Cheers, Andrew

            1 Reply Last reply
            0
            • A Offline
              A Offline
              andsampson
              wrote on Mar 27, 2019, 11:40 AM last edited by
              #6

              PS: I have 'Link Target' selected in 'Screen Options', but unchecking the 'Open link in new tab' box is not doing the trick.0_1553686768879_Screenshot 2019-03-27 at 12.38.24.png

              PPS: The info@laytheme email isn't working, and I still need my registration key. Posted about this in General Discussion a couple days ago.

              Thanks for the help !

              1 Reply Last reply
              0
              • M Offline
                M Offline
                mariusjopen
                Global Moderator
                wrote on Mar 27, 2019, 5:10 PM last edited by
                #7

                Dear @zippitybop
                yes. I was able to reproduce this.
                The link always opens in a new window.

                There is the option to do that with jQuery. But I think that this should work in general.

                I will talk with Armin about it.

                Best!

                Marius

                www.mariusjopen.world

                1 Reply Last reply
                0
                • A Offline
                  A Offline
                  arminunruh
                  Global Moderator
                  wrote on Mar 29, 2019, 10:47 AM last edited by
                  #8

                  In Lay Options disable "Menu links of type "Custom Links" always open in new tab"

                  1 Reply Last reply
                  0
                  Reply
                  • Reply as topic
                  Log in to reply
                  • Oldest to Newest
                  • Newest to Oldest
                  • Most Votes

                  8/8

                  Mar 29, 2019, 10:47 AM


                  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
                  D
                  dmncn
                  12 minutes ago
                  C
                  craigfeldspar
                  14 minutes ago
                  S
                  Starc
                  18 minutes ago
                  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.
                  8 out of 8
                  • First post
                    8/8
                    Last post
                  0
                  • Recent
                  • Tags
                  • Popular
                  • Users
                  • Search