0

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?

Thanks,
Josh

1 Answer 1

2

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);

Thanks,
Josh

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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