ThemeShaper Forums » Thematic


creating thumbnail image for post listing but different then post page image

(11 posts)
  • Started 12 years ago by hally
  • Latest reply from Chris
  • This topic is not resolved
  1. hally

    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?

    Posted 12 years ago #
  2. hally

    I tried some custom hacks but I don't seem to ge it working.

    Posted 12 years ago #
  3. hally

    If you guy can help me that would great

    Posted 12 years ago #
  4. 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.


    Posted 12 years ago #
  5. hally

    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 12 years ago #
  6. 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');

    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>') ?>
    				<?php thematic_postfooter(); ?>
    			</div><!-- .post -->
    				<?php comments_template();
    				if ($count==$thm_insert_position) {
    				$count = $count + 1;
    add_action('thematic_indexloop', 'my_index_loop');

    You can apply the same logic to thematic_category_loop without the is_home condition.


    Posted 12 years ago #
  7. hally

    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 12 years ago #
  8. hally

    What i am trying to accomplish is also get the post title at the right side of the image.

    Posted 12 years ago #
  9. hally

    Instead of the title being above.

    Posted 12 years ago #
  10. hally

    For instance on 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 12 years ago #
  11. 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.


    Posted 12 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.