Hello all,
I am having the worst time trying to limit character count on a site I am designing. I am using this custom fuction which for some reason looks fine on the homepage, but as soon as I select "Older Posts" the CSS gets screwed up. I'm not sure what might be causing this. If I switch back to a regular the_content call everything is fine. Can someone see something in this code that might cause this?
function content($limit) {
$content = explode(' ', get_the_content(), $limit);
if (count($content)>=$limit) {
array_pop($content);
$content = implode(" ",$content).'...';
} else {
$content = implode(" ",$content);
}
$content = preg_replace('/\[.+\]/','', $content);
$content = apply_filters('the_content', $content);
$content = str_replace(']]>', ']]>', $content);
return $content;
}
I'd really like to sort this out. Thanks!