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')?


Put a filter on the_content_more_link.

Untested but...

function wrap_more_link($more) {
    return '<div>'.$more.'</div>';

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 '&nbsp; &nbsp;><a href="'. get_permalink($post->ID) . '"><div> Change Read more text here</div></a>';
add_filter('excerpt_more', 'more_excerpt');

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.