最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

widgets - How to point menu to my homepage

programmeradmin0浏览0评论

So basicially i have a long-long homepage where you can scroll down and find a services section, if you scroll down more you see important informations and etc. but i have a menu. I want to make the buttons on the menu to scroll me down to that section so for example if i click sercives it scrolls me down to services on my main page

So basicially i have a long-long homepage where you can scroll down and find a services section, if you scroll down more you see important informations and etc. but i have a menu. I want to make the buttons on the menu to scroll me down to that section so for example if i click sercives it scrolls me down to services on my main page

Share Improve this question asked May 11, 2019 at 12:52 D.TomiD.Tomi 31 bronze badge
Add a comment  | 

1 Answer 1

Reset to default 0

You will need to add "Custom Links" to your menu to point to the homepage + the specific anchor on the page.

For example, your services section may have the markup:

<section id="services">
   <h2>Services</h2>
   <p>Some text</p>
</section>

So your custom menu link would need to have a URL of /#services. You need the / slash at the start so that if someone clicks the menu from elsewhere in the site, it will first go to the homepage and then link to services, rather than trying to look for that ID on the current page.

发布评论

评论列表(0)

  1. 暂无评论