Title: This function stopped working with 3.6
Last modified: August 21, 2016

---

# This function stopped working with 3.6

 *  Resolved [monkeybrain](https://wordpress.org/support/users/monkeybrain/)
 * (@monkeybrain)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/this-function-stopped-working-with-36/)
 * Hi everybody
 * I had this custom functions in my functions.php for a while now, it replaces 
   the […] at the end of an excerpt with a permalink. Unfortunately this stopped
   working with WP 3.6, does anyone have an idea why and how to fix it?
 *     ```
       function replace_excerpt($content) {
              return str_replace('[...]',
                      '<p class="more-link"><a href="'. get_permalink() .'">Continue Reading</a></p>',
                      $content
              );
       }
       add_filter('the_excerpt', 'replace_excerpt');
       ```
   
 * Thanks alot!

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

 *  Moderator [bcworkz](https://wordpress.org/support/users/bcworkz/)
 * (@bcworkz)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/this-function-stopped-working-with-36/#post-4063456)
 * Not sure why it no longer works, but you should use the ‘excerpt_more’ filter
   instead of ‘the_excerpt’. Then you can simply return your content instead of 
   needing to search for where to replace it. You end up with more robust code this
   way that should be more upgrade proof. See the example in [this](http://codex.wordpress.org/Customizing_the_Read_More#Displaying_a_.22more.E2.80.A6.22_link_when_using_the_the_excerpt.28.29)
   section. Also note the following paragraph about other theme filters, which may
   be why you have a problem, and may still be a problem using the ‘excerpt_more’
   filter.
 *  Thread Starter [monkeybrain](https://wordpress.org/support/users/monkeybrain/)
 * (@monkeybrain)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/this-function-stopped-working-with-36/#post-4063490)
 * Thanks a lot, bcworkz!
    Using excerpt_more works! (No issues with other theme
   filters)

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

The topic ‘This function stopped working with 3.6’ is closed to new replies.

## Tags

 * [excerpt](https://wordpress.org/support/topic-tag/excerpt/)
 * [function](https://wordpress.org/support/topic-tag/function/)

 * In: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
 * 2 replies
 * 2 participants
 * Last reply from: [monkeybrain](https://wordpress.org/support/users/monkeybrain/)
 * Last activity: [12 years, 9 months ago](https://wordpress.org/support/topic/this-function-stopped-working-with-36/#post-4063490)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
