Title: Excerpt Link
Last modified: August 20, 2016

---

# Excerpt Link

 *  [darrenmtay](https://wordpress.org/support/users/darrenmtay/)
 * (@darrenmtay)
 * [13 years, 11 months ago](https://wordpress.org/support/topic/excerpt-link/)
 * Hi Guys,
 * I have created a child theme based on the twentyten theme. It all works great
   however something strange is happening.
 * The homepage displays a list of post excerts which is great. All of the links
   work great too.
 * When i hover over the Post Title, the link displays correctly. When i hover over
   the ‘Read More’ link there seems to be an extra _#more-‘_ after the link. I have
   looked through all of the template files but am really struggling to see what
   is going on.
 * When clicked it works fine but why is the read more link displaying this additional
   bit of code at the end of the link to the full post when i hover my mouse over
   it?
 * Any help is hugely appreciated as ever guys.
 * Thank you.

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

 *  [Oliver Farrell](https://wordpress.org/support/users/oliverfarrell/)
 * (@oliverfarrell)
 * [13 years, 11 months ago](https://wordpress.org/support/topic/excerpt-link/#post-2854114)
 * By default WordPress will add the ‘#more-‘ after your posts permalinks. It enables
   people to skip to the rest of the article if they have read the excerpt.
 * To remove that, you need to add the following to your functions.php
 *     ```
       function removeReadMoreHash($link) {
          $offset = strpos($link, '#more-');
          if ($offset) {
       	  $end = strpos($link, '"',$offset);
          }
          if ($end) {
       	  $link = substr_replace($link, '', $offset, $end-$offset);
          }
          return $link;
       }
       add_filter('the_content_more_link', 'removeReadMoreHash');
       ```
   
 * That should do the trick.
 *  [dtay1984](https://wordpress.org/support/users/dtay1984/)
 * (@dtay1984)
 * [13 years, 11 months ago](https://wordpress.org/support/topic/excerpt-link/#post-2854142)
 * Hi Colin,
 * Thanks for your help with this. Hugely appreciated. Doesnt seem to have any effect
   though. Here’s the child theme functions.php file …
 * _[538 lines of code moderated as per the [Forum Rules](http://codex.wordpress.org/Forum_Welcome#Posting_Code).
   The maximum number of lines of code that you can post in these forums is **ten
   lines**. Please use the [pastebin](http://wordpress.pastebin.com/)]_
 *  [dtay1984](https://wordpress.org/support/users/dtay1984/)
 * (@dtay1984)
 * [13 years, 11 months ago](https://wordpress.org/support/topic/excerpt-link/#post-2854143)
 * Its near the top of the file. Sorry, i forgot to say.
 *  [Oliver Farrell](https://wordpress.org/support/users/oliverfarrell/)
 * (@oliverfarrell)
 * [13 years, 11 months ago](https://wordpress.org/support/topic/excerpt-link/#post-2854151)
 * I noticed that you have two functions declared to remove the read more hash, 
   maybe try deleting the second one.
 * It’s likely that there’s some conflict with another function.
 * Let me know whether removing the duplicate function works for you.

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

The topic ‘Excerpt Link’ is closed to new replies.

## Tags

 * [child theme](https://wordpress.org/support/topic-tag/child-theme/)
 * [excerpts](https://wordpress.org/support/topic-tag/excerpts/)
 * [links](https://wordpress.org/support/topic-tag/links/)

 * 4 replies
 * 3 participants
 * Last reply from: [Oliver Farrell](https://wordpress.org/support/users/oliverfarrell/)
 * Last activity: [13 years, 11 months ago](https://wordpress.org/support/topic/excerpt-link/#post-2854151)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
