Hi Gene and thank you so much for your answer.
What I have managed to do now is use your function to be able to use the excerpt on the homepage like so:
function child_content($content) {
if ( is_category() ) {
$content = 'excerpt';
}
return $content;
}
add_filter('thematic_content', 'child_content');
This takes care of my homepage..
What I have so far for the Category page is this.
// Add filter to the_content
add_filter('the_content', 'my_excerpts');
function my_excerpts($content = false) {
// If is the category page
if(is_category()) :
global $post;
$content = $post->post_content;
$excerpt_length = 15;
$words = explode(' ', $content, $excerpt_length + 1);
if(count($words) > $excerpt_length) :
array_pop($words);
array_push($words, '...');
$content = implode(' ', $words);
endif;
$content = '' . $content . '
';
endif;
return $content;
}
It kind of works.. But in my category page to get the code above to work I call the content with
<?php echo (the_content()); ?>
And that displays the image in the post as well. Is there a way to filter out the image somehow ? The thing is that I don't want the images from the post to appear.
Best regards,
Fannar