Is there a way to add a a thumbnail image to posts listed in category and frontpage but when you got the post page itself (single.php) that you then see the proper alignment and true size of the post?
ThemeShaper Forums » Thematic
creating thumbnail image for post listing but different then post page image
(11 posts)-
Posted 2 years ago #
-
I tried some custom hacks but I don't seem to ge it working.
Posted 2 years ago # -
If you guy can help me that would great
Posted 2 years ago # -
Try the get the image plugin. Look in thmeatic/library/extensions/content-extensions.php and look for the loops to edit and add into your own child theme functions.php.
You'll want to remove the thematic_index_loop and thematic_category_loop actions and rebuild them to include the plugin's function.
http://justintadlock.com/archives/2008/05/27/get-the-image-wordpress-plugin
-Gene
Posted 2 years ago # -
Hello em hr I can't say I know how to rebuild the index loop and category loop. I don't know what to remove and what to add.
Can you help me out?
Posted 2 years ago # -
hally-
Removing an action is simply telling wordpress to forget about what thematic asked it to do before executing thematic's functions.
function remove_thematic_index_loop() { remove_action ('thematic_indexloop','thematic_index_loop'); } add_action('init','remove_thematic_index_loop');Rebuilding it is and how is really up to you Below I've just copied the code from the thematic_index_loop and added something new.
function my_index_loop() { global $options, $post; // $post is given global scope to make the plugin work properly foreach ($options as $value) { if (get_option( $value['id'] ) === FALSE) { $$value['id'] = $value['std']; } else { $$value['id'] = get_option( $value['id'] ); } } /* Count the number of posts so we can insert a widgetized area */ $count = 1; while ( have_posts() ) : the_post() ?> <div id="post-<?php the_ID() ?>" class="<?php thematic_post_class() ?>"> <?php // here is an example of using the get_the_image plugin so that it only is affective on the home page if ( is_home() && function_exists( 'get_the_image' ) ) { get_the_image(); } ?> <?php thematic_postheader(); ?> <div class="entry-content"> <?php thematic_content(); ?> <?php wp_link_pages('before=<div class="page-link">' .__('Pages:', 'thematic') . '&after=</div>') ?> </div> <?php thematic_postfooter(); ?> </div><!-- .post --> <?php comments_template(); if ($count==$thm_insert_position) { get_sidebar('index-insert'); } $count = $count + 1; endwhile; } add_action('thematic_indexloop', 'my_index_loop');You can apply the same logic to thematic_category_loop without the is_home condition.
-Gene
Posted 2 years ago # -
I really appreciate the code but unfortunately I can't get the plugin to work for me. It seems to be having problems. I wish it worked.
Do you know of any other way?
Posted 2 years ago # -
What i am trying to accomplish is also get the post title at the right side of the image.
Posted 2 years ago # -
Instead of the title being above.
Posted 2 years ago # -
For instance on kineda.com you see the thumbnail image to the post preview. The title is at the right side of the image, then once you go to the post you see the full size image.
Posted 2 years ago # -
Hi,
the follwoing post is 'bout using custom fields and position an image above the post title, but with some minor changes and some additional CSS markup you should be able to arrange the image and the post title according to your needs.
http://themeshaper.com/forums/topic/introducing-custom-fields-into-thematic
Chris
Posted 2 years ago #
Reply
You must log in to post.