• My theme has this filter in it’s function file:

    function new_excerpt_more( $more ) {
        global $post;
    
        return ' […] <div class="clear"></div><a class="more_link clearfix" href="' . get_permalink( $post->ID ) . '" rel="nofollow">' . __( 'Read More &rarr;', 'wpzoom' ) . '</a>';
    }
    
    add_filter( 'excerpt_more', 'new_excerpt_more' );

    I want to delete the linked “Read More” that gets attached to the excerpts on my archive index pages. So I created a plugin that looks like this:

    remove_filter( 'excerpt_more', 'new_excerpt_more' );
    
    function my_excerpt_more( $more ) {
        global $post;
    
        return ' &hellip;';
    }
    
    add_filter( 'excerpt_more', 'my_excerpt_more' );

    but it is not working. I suspect I have the remove_filter wrong?

The topic ‘Removing a filter’ is closed to new replies.