• I am having a problem with functions. I want to style the Continue Reading link, and have successfully written the function and the add filter code, as below:

    function read_more() {
    	return ' <a href="'. get_permalink() . '">' . __( '<span class="more-link">Continue reading <span class="meta-nav">&rarr;</span>', 'twentyten' ) . '</a></span>';
    }
    
    function continue_link( $output ) {
    	if ( has_excerpt() && ! is_attachment() ) {
    		$output .= read_more();
    	}
    	return $output;
    }
    
    remove_filter( 'get_the_excerpt', 'twentyten_custom_excerpt_more' );
    add_filter( 'get_the_excerpt', 'continue_link' );

    This does add my styled link exactly where I want it, but the remove_filter function doesn’t remove the old Continue Reading link; I get both of them instead. It may well be I’m not calling it properly, but having searched for three days, I can’t figure out where the problem lies.

    Any help would be much appreciated, thank you.

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Styling the Continue Reading link’ is closed to new replies.