Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

WordPress

Do anchor links work across text blocks?

I use the Wordpress Theme Enfold.

I have a page that contains multiple text blocks. I want to place an anchor in text block number 1, which directs people to text block number 5, which is all the way at the bottom.

Is this possible? I thought it might not be, because text block number 1 is a whole separate entity then text block number 2. Perhaps anchors only work WITHIN one text block.

Please help; i would be happy to clarify if need be. -Elliot

1 Answer

Rhoda Toynbee
Rhoda Toynbee
18,938 Points

Yes! You would give the text block that you want to jump to an id tag:

 <p id="jump-here">All the text information!</p>

And then you would reference that id tag in your href link:

<a href="#jump-here"> Read all the info!</a>

There are more references to different types of links you can reference. Something like this might help: http://www.w3schools.com/html/html_links.asp

:) Rhoda