Adding custom anchor links and page links in WordP

2019-09-12 16:03发布

问题:

I've created two pages, one to act as a onepage site and one for the blog. I have anchor links on sections on my onepage to 'about', 'portfolio' etc. for the onepage. I have a page link to 'blog'.

On my menu I have created custom links to each section as #about and #portfolio and this works fine. However, if I go into the Blog and try to use the menu to go back to a section on the onepage it doesn't work as I get www.example.com/blog#about

But if I set the anchor links in the menu to http://example.com#about, http://example.com#portfolio etc then none of the anchor links work. I'm stuck. Would love some help please

回答1:

Solved it: Easier than I thought. The onepage was named 'home' so all I needed to do was create custom links like: http://www.example.com/home#portfolio



标签: wordpress