Title: Using Anchor Text
Last modified: August 20, 2016

---

# Using Anchor Text

 *  [Robert Roy](https://wordpress.org/support/users/robertjroy/)
 * (@robertjroy)
 * [13 years, 10 months ago](https://wordpress.org/support/topic/using-anchor-text/)
 * Hello there,
 * I have a gaming blog and am trying to make navigation easier for users who are
   looking to find video trailers in posts.
 * I have created a ‘trailers’ category which is shown as a menu item. This is used
   to display the list of posts that have trailers in them. In each post I have 
   then created an anchor text like this: <h3 id=”trailers”>Trailers</h3>
 * How do I make it so that when users click on the link to the post, it will then
   load that post and automatically move down the trailers section of that post?

Viewing 7 replies - 1 through 7 (of 7 total)

 *  [wpismypuppet](https://wordpress.org/support/users/wordpressismypuppet/)
 * (@wordpressismypuppet)
 * [13 years, 10 months ago](https://wordpress.org/support/topic/using-anchor-text/#post-2886293)
 * [http://www.codertools.com/html_guide/html_named_anchors_bookmark_links.aspx](http://www.codertools.com/html_guide/html_named_anchors_bookmark_links.aspx)
 *  Thread Starter [Robert Roy](https://wordpress.org/support/users/robertjroy/)
 * (@robertjroy)
 * [13 years, 10 months ago](https://wordpress.org/support/topic/using-anchor-text/#post-2886295)
 * Thank you for that, looks like it will do the trick.
 * However, how do I change the link that is generated by the ‘trailers’ category
   to include the link to the bookmark?
 *  [wpismypuppet](https://wordpress.org/support/users/wordpressismypuppet/)
 * (@wordpressismypuppet)
 * [13 years, 10 months ago](https://wordpress.org/support/topic/using-anchor-text/#post-2886296)
 * There are a number of ways to do that, but I’d need to see how you currently 
   are getting a list of categories and their links. Then I can give you the correct
   information.
 *  Thread Starter [Robert Roy](https://wordpress.org/support/users/robertjroy/)
 * (@robertjroy)
 * [13 years, 10 months ago](https://wordpress.org/support/topic/using-anchor-text/#post-2886297)
 * No problem, I appreciate your help. You can view the website at [http://www.theparadym.co.uk](http://www.theparadym.co.uk).
 * I would like to add the bookmarks to the links in [http://www.theparadym.co.uk/trailers/](http://www.theparadym.co.uk/trailers/)
 *  [wpismypuppet](https://wordpress.org/support/users/wordpressismypuppet/)
 * (@wordpressismypuppet)
 * [13 years, 10 months ago](https://wordpress.org/support/topic/using-anchor-text/#post-2886301)
 * To get this straight, you want people who visit this page:
 * [http://www.theparadym.co.uk/trailers/](http://www.theparadym.co.uk/trailers/)
 * To click any one of the titles… “Watch Dogs” for example… and be brought to this
   page:
 * [http://www.theparadym.co.uk/games/watch-dogs/](http://www.theparadym.co.uk/games/watch-dogs/)
 * But scroll down to “trailers”. Correct?
 *  Thread Starter [Robert Roy](https://wordpress.org/support/users/robertjroy/)
 * (@robertjroy)
 * [13 years, 10 months ago](https://wordpress.org/support/topic/using-anchor-text/#post-2886303)
 * Yes, that’s exactly what I want. The pages are currently stubs but will be much
   longer once they’re complete, hence why it’ll be useful to have them automatically
   moved to the correct place.
 *  [wpismypuppet](https://wordpress.org/support/users/wordpressismypuppet/)
 * (@wordpressismypuppet)
 * [13 years, 10 months ago](https://wordpress.org/support/topic/using-anchor-text/#post-2886308)
 * Ok… so here’s the deal.n On the page that generates this page:
 * [http://www.theparadym.co.uk/trailers/](http://www.theparadym.co.uk/trailers/)
 * Find where the title is being pumped out. It might be index.php for all I know,
   but you’ll want a template file for this page regardless since you want to add#
   trailer to the end of those anchor tags, and you don’t want that to be appending
   to just any post. Are you familiar with making a template?
 * Once you find where the title is being pumped out, you’ll see the code that makes
   the anchor tag enclosing it… Might look something like:
 * `echo '<h4><a href="'.get_permalink().'">'.get_the_title().'</a></h4>';`
 * Simply change it to look like this:
 * `echo '<h4><a href="'.get_permalink().'#trailer">'.get_the_title().'</a></h4>';`
 * Then, on the page that is generating these “pages”:
 * [http://www.theparadym.co.uk/games/watch-dogs/](http://www.theparadym.co.uk/games/watch-dogs/)
 * Where you are pumping out the word “Trailers” add the bookmark. So I believe 
   you have:
 * `<h3 id="trailers">Trailers</h3>`
 * Change it to:
 * `<h3 id="trailers"><a name="trailer"></a>Trailers</h3>`
 * Just make sure the name=”trailer” matches #trailer. You don’t want name=”trailer”
   and then #trailers as that won’t work. Just duplicate this method for Games, 
   News, whatever…

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Using Anchor Text’ is closed to new replies.

## Tags

 * [anchor](https://wordpress.org/support/topic-tag/anchor/)
 * [category](https://wordpress.org/support/topic-tag/category/)
 * [menu](https://wordpress.org/support/topic-tag/menu/)
 * [text](https://wordpress.org/support/topic-tag/text/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 7 replies
 * 2 participants
 * Last reply from: [wpismypuppet](https://wordpress.org/support/users/wordpressismypuppet/)
 * Last activity: [13 years, 10 months ago](https://wordpress.org/support/topic/using-anchor-text/#post-2886308)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
