Anchor tags from main menu (one-page site)
-
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 -
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
-
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 -
Dear @zippitybop
sure. no problem.
Have a good day!Marius
-
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 -
PS: I have 'Link Target' selected in 'Screen Options', but unchecking the 'Open link in new tab' box is not doing the trick.
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 !
-
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
-
In Lay Options disable "Menu links of type "Custom Links" always open in new tab"
Before you post
Use the Search Feature. Maybe there is already a solution to your issue.
1. Update Lay Theme and all Lay Theme Addons
2. Disable all Plugins
3. Go to Lay Options → Custom CSS & HTML, click "Turn Off All Custom Code ", click "Save Changes"
4. Now see if your problem solved itself
5. Go here, see if your problem is listed here:
Troubleshooting
When you post:
1. Post a link to where the problem is
2. If the problem is difficult to explain, post screenshots / link to a video to explain it