Wordpress - 一页导航
Wordpress - One page navigation
我是一个完全的 Wordpress 新手,所以我的问题可能非常愚蠢。
我安装了一个 Wordpress 和一个主题,(效果很好)。
这个主题是一个带有一个主顶部菜单的静态单页导航。
当您单击联系人按钮时,它会一直向下滚动,并带有漂亮的视差效果(在主题中)。问题是,它只适用于 CONTACT 和 HOME(第一个)。
什么都试过了,页面设置没有区别,都是发的模板,导航ID和菜单里的一样。
唯一的区别是,当我点击联系人或主页时,URL 保持不变 http://website.com . BUT when I click on the other ones (those that dont work) the URL become this : http://website.com/#slug。
我知道这就是不同之处,但我不知道如何改变它。
编辑:如果我下载主题的演示内容,它无需更改任何东西就可以很好地工作。
救我:p.
感谢您的宝贵时间。
website.com/#slug
表示页面 header link 想要转到该页面上的 ID 部分,如果该部分没有名为 slug 的 ID,它将无法工作。
示例。
.height {
min-height: 150px;
}
<a href="#section1">header</a> <br> <a href="#section2">content</a> <br> <a href="#section3">bottom content</a> <br> <a href="#section4">footer</a>
<div class="height" id="section1">header (the divs could be anything from p tags to a tags, form tags...)</div>
<div class="height" id="section2">content</div>
<div class="height" id="section3">bottom content</div>
<div class="height" id="section4">footer</div>
应该是这样的...所以您的菜单必须 link 到正确的部分 ID。然后它应该工作。
我是一个完全的 Wordpress 新手,所以我的问题可能非常愚蠢。
我安装了一个 Wordpress 和一个主题,(效果很好)。
这个主题是一个带有一个主顶部菜单的静态单页导航。
当您单击联系人按钮时,它会一直向下滚动,并带有漂亮的视差效果(在主题中)。问题是,它只适用于 CONTACT 和 HOME(第一个)。 什么都试过了,页面设置没有区别,都是发的模板,导航ID和菜单里的一样。
唯一的区别是,当我点击联系人或主页时,URL 保持不变 http://website.com . BUT when I click on the other ones (those that dont work) the URL become this : http://website.com/#slug。
我知道这就是不同之处,但我不知道如何改变它。
编辑:如果我下载主题的演示内容,它无需更改任何东西就可以很好地工作。
救我:p.
感谢您的宝贵时间。
website.com/#slug
表示页面 header link 想要转到该页面上的 ID 部分,如果该部分没有名为 slug 的 ID,它将无法工作。
示例。
.height {
min-height: 150px;
}
<a href="#section1">header</a> <br> <a href="#section2">content</a> <br> <a href="#section3">bottom content</a> <br> <a href="#section4">footer</a>
<div class="height" id="section1">header (the divs could be anything from p tags to a tags, form tags...)</div>
<div class="height" id="section2">content</div>
<div class="height" id="section3">bottom content</div>
<div class="height" id="section4">footer</div>
应该是这样的...所以您的菜单必须 link 到正确的部分 ID。然后它应该工作。