Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //change where theme uses excerpts
- function childtheme_content($content) {
- if (is_home() || is_archive()) {
- $content= 'more';
- }
- return $content;
- }
- add_filter('thematic_content', 'childtheme_content');
- function childtheme_excerpts($content) {
- global $thematic_content_length, $post;
- if ( strtolower($thematic_content_length) == 'more' ) {
- if ( preg_match('/<!--more(.*?)?-->/', $post->post_content ) ) {
- $content = get_the_content(more_text());
- $content = apply_filters('the_content', $content);
- $content = str_replace(']]>', ']]>', $content);
- } else {
- $content = '';
- $content .= get_the_excerpt();
- $content = apply_filters('the_excerpt',$content);
- if ( apply_filters( 'thematic_post_thumbs', TRUE) ) {
- $content_title = get_the_title();
- $size = apply_filters( 'thematic_post_thumb_size' , array(100,100) );
- $attr = apply_filters( 'thematic_post_thumb_attr', array('title' => 'Permalink to ' . $post_title) );
- if ( has_post_thumbnail() ) {
- $content = '<a class="entry-thumb" href="' . get_permalink() . '" title="Permalink to ' . get_the_title() . '" >' . get_the_post_thumbnail(get_the_ID(), $size, $attr) . '</a>' . $content;
- }
- }
- }
- }
- return $content;
- }
- add_filter('thematic_post', 'childtheme_excerpts');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement