WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I would like to put the "more" link in it's own div and am having some trouble... my current code looks like: the_content("<div class='more'>More &gt;&gt;</div>");

But the problem is that the output is not cross-browser compatible...Safari and Firefox render this fine, placing the div around the more link...but IE8 renders the div in the a tag of the link, making it look funny.

Is there a function I can add to my theme that would allow me to wrap a div around the more link so I don't have to worry about how different browsers interpret my original code?


share|improve this question
up vote 2 down vote accepted

I found a solution on the WordPress forums, if anyone is trying to do the same thing here is the solution: http://wordpress.org/support/topic/custom-read-more-text-wrapped-in-a-div

I added the following to my functions file:

function wrap_readmore($more_link) {
    return '<div class="post-readmore">'.$more_link.'</div>';
add_filter('the_content_more_link', 'wrap_readmore', 10, 1);


share|improve this answer

Your Answer


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.