Can someone tell me how to wrap the Read More anchor (that displays after an excerpt) with DIV tags using get_the_content('Read More')
?
2 Answers
Put a filter on the_content_more_link
.
Untested but...
function wrap_more_link($more) {
return '<div>'.$more.'</div>';
}
add_filter('the_content_more_link','wrap_more_link');
I use this on all my themes. pretty similar to the answer above This will add a permalink to the the "more" text . You can also add div and style it accordingly. Hope this helps
function more_excerpt($more) {
global $post;
return ' ><a href="'. get_permalink($post->ID) . '"><div> Change Read more text here</div></a>';
}
add_filter('excerpt_more', 'more_excerpt');