June 27, 201412 yr Hello all I am trying to create anchor links to jump to different sections of different page, but I can't seem to figure out how to do it in Wordpress. I have a link from the home page that when pressed I want it to jump to a specific section on the about us page. I created the pages in HTML first and had the following code which worked fine. Home Page <h1><a href="about.html#class" title="Class">Classes</a></h1> About Us <h3><a name="class">Class</a></h3> I'm not sure how to get this to work in Wordpress. Can anyone point me in the right direction? Thanks
June 27, 201412 yr Author Yes I have. I guessing I will have to replace about.html with the page ID, but I'm not sure if this is correct or the correct way to do this.
June 27, 201412 yr add the id="class" within the <a> like <h3><a name="class" id="class">Class</a></h3> this does it for me on my theme
June 27, 201412 yr Author Thanks for your reply. What about the href? How do I get that to link from the home page to the about us page?
June 27, 201412 yr Leave that the way it is <h1><a href="about.html#class" title="Class">Classes</a></h1> the about.php will link to the about page then the #class will anchor down to the <div> with the id="class"
June 30, 201412 yr This should work : <a href="index.php?page_id=10#class"> change '10' to the id of your about page.
June 30, 201412 yr Author This should work : <a href="index.php?page_id=10#class"> change '10' to the id of your about page. Thanks. This worked.
July 8, 201412 yr You can aslo change it via setting permalink. From White Digital Web http://www.whitedigitalweb.com
Create an account or sign in to comment