Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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

share|improve this question
add comment

2 Answers

up vote 3 down vote accepted

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');
share|improve this answer
add comment

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');
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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