Created
September 19, 2012 16:46
-
-
Save scottnix/3750712 to your computer and use it in GitHub Desktop.
Thematic Theme Excerpt Read More on both manual and auto excerpt.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function childtheme_override_content() { | |
global $thematic_content_length; | |
if ( strtolower($thematic_content_length) == 'full' ) { | |
$post = get_the_content( thematic_more_text() ); | |
$post = apply_filters('the_content', $post); | |
$post = str_replace(']]>', ']]>', $post); | |
} elseif ( strtolower($thematic_content_length) == 'excerpt') { | |
$post = ''; | |
$post .= get_the_excerpt(); | |
$post .= '... <a href="'.get_permalink().'"> Read More »</a>'; | |
$post = apply_filters('the_excerpt',$post); | |
if ( apply_filters( 'thematic_post_thumbs', TRUE) ) { | |
$post_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() ) { | |
$post = '<a class="entry-thumb" href="' . get_permalink() . '" title="Permalink to ' . get_the_title() . '" >' . get_the_post_thumbnail(get_the_ID(), $size, $attr) . '</a>' . $post; | |
} | |
} | |
} elseif ( strtolower($thematic_content_length) == 'none') { | |
} else { | |
$post = get_the_content( thematic_more_text() ); | |
$post = apply_filters('the_content', $post); | |
$post = str_replace(']]>', ']]>', $post); | |
} | |
echo apply_filters('thematic_post', $post); | |
} | |
function childtheme_excerpt_trailing($text) { | |
return str_replace('[...]', '', $text); | |
} | |
add_filter('get_the_excerpt', 'childtheme_excerpt_trailing'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment