Remove Read More Link Excerpt Wordpress

Leave a Comment

Filter excerpt_more Hook Wordpress:

     excerpt_more filter from wordpress allow us to change the read more link of the the_excerpt() in wordpress.

Add the following Filter hook in your functions.php file. This will change the Read More.. link to ....

function new_excerpt_more( $more ) {
	return '.....';
add_filter('excerpt_more', 'new_excerpt_more');

 If you still want to customize that read more link in different way, then use following script..

Where we get the post id of the particular post from global post variable then pass that post id to get_permalink() function to get post link.

Use your own css to customize the way you want to look that read more link.

function new_excerpt_more($more) {
    global $post;
    return '<a href="'.get_permalink($post->ID).'">Continue Reading...</a>';
add_filter('excerpt_more', 'new_excerpt_more');


Post a Comment