Allright, go easy on me, I'm very new to all of this... :)
I would like to arrange most of my pages (except home and single) to show the post title, then the excerpt, then a thumbnail. Is there a way to do this? I've been learning a lot about hooks and filters, and I almost have my head wrapped around it, I think... But I keep getting title, thumb, then excerpt... Any help is appreciated! The site I'm working on is here: www.beta.alohastatemedia.com
Thanks again everyone!
ThemeShaper Forums » Thematic
[closed]
Arranging "title" then "excerpt" then "thumb" ??
(5 posts)-
Posted 2 years ago #
-
here's a better link: http://beta.alohastatemedia.com/category/photography
Posted 2 years ago # -
woo hooo! finally figured it out. so, I guess the loop builds the $post and all I had to do was rearrange the php to append the excerpt before it appended the thumbnail. Code below just incase anyone needs it:
// New content loop - sets thumbs to wide and cropped function childtheme_override_content() { global $thematic_content_length; if ( strtolower($thematic_content_length) == 'full' ) { $post = get_the_content(more_text()); $post = apply_filters('the_content', $post); $post = str_replace(']]>', ']]>', $post); } elseif ( strtolower($thematic_content_length) == 'excerpt') { $post = ''; $post .= get_the_excerpt(); $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(730,200) ); $attr = apply_filters( 'thematic_post_thumb_attr', array('title' => 'Go to ' . $post_title) ); if ( has_post_thumbnail() ) { $post .= '<a class="entry-thumb" href="' . get_permalink() . '" title="Go to ' . get_the_title() . '" >' . get_the_post_thumbnail(get_the_ID(), $size, $attr) . '</a>'; } } } elseif ( strtolower($thematic_content_length) == 'none') { } else { $post = get_the_content(more_text()); $post = apply_filters('the_content', $post); $post = str_replace(']]>', ']]>', $post); } echo apply_filters('thematic_post', $post); }Posted 2 years ago # -
you should also be able to filter it if you are only changing the one conditional. untested...
//modify default Thematic excerpts function childtheme_excerpts($post) { global $thematic_content_length; if ( strtolower($thematic_content_length) == 'excerpt' ) { $post = ''; $post .= get_the_excerpt(); $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(730,200) ); $attr = apply_filters( 'thematic_post_thumb_attr', array('title' => 'Go to ' . $post_title) ); if ( has_post_thumbnail() ) { $post .= '<a class="entry-thumb" href="' . get_permalink() . '" title="Go to ' . get_the_title() . '" >' . get_the_post_thumbnail(get_the_ID(), $size, $attr) . '</a>'; } } return $post; } add_filter('thematic_post', 'childtheme_excerpts');Posted 2 years ago # -
whew! That makes my brain hurt :) I have a lot to learn! Thanks for the response, you give great answers.
Posted 2 years ago #
Topic Closed
This topic has been closed to new replies.