Jump Links in the Loop
-
Hey all.
I am currently developing a theme that has a very large header (https://wpdev.hugsformonsters.com).
I got the idea to include a jump link in my index.php loop to take users directly to the content of the post they click on:
<a href="<?php the_permalink() ?>/<strong>#header</strong>" rel="bookmark" title="<?php the_title_attribute(); ?>">
I included this html on the single.php page:
<h2> <a <strong>name="header"</strong> rel="bookmark" title="<?php the_title_attribute(); ?>"> <?php the_title(); ?> </a> </h2>
The link on index.php always takes you to the correct post without incident, but it does not take you to the correct point on the page. I did some searching and was unable to find a similar case of this.
Is there anything in WordPress that prevents the use of jump links in this manner?
Thank you!
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Jump Links in the Loop’ is closed to new replies.