ThemeShaper Forums » Thematic

[closed]

category thumbnail issue- duplicate images

(13 posts)
  • Started 8 years ago by cookieandkate
  • Latest reply from antony09
  • This topic is resolved
  1. Hi all,

    This weekend, I upgraded to the latest version of thematic and made lots of minor changes to my CSS coding. I never made any changes to the category page template, but now duplicate thumbnail images of two different sizes are showing up on my category pages! I spent forever trying to set up the thumbnails on the category archive pages (see how I did it here: http://forums.themeshaper.com/topic/adding-thumbnails-to-category-and-date-archive-results), and I have no idea where the little 100x100 px thumbnails came from.

    You can check out the issue here: http://cookieandkate.com/category/photography/

    I don't know where to begin. Any assistance would be greatly appreciated. Thank you!

    p.s. yesterday I installed the Faster Image Uploader plugin, if that makes a difference.

    Posted 8 years ago #
  2. illustrata
    Member

    I'm having the same problem...

    Posted 8 years ago #
  3. This is because Thematic 0.9.7.6 introduced the use of post thumbnails by default on archives. Look into

    thematic>library>extensions>content-extensions.php

    thematic_content_init()
    thematic_content()

    Those are the functions you may need to look into for filters that will help you make the changes you want. Come back if you have a hard time with it and mark the thread "resolved" when you've figured it out.

    -Gene

    Posted 8 years ago #
  4. illustrata
    Member

    Thanks for the lightening response.

    I'd do anything to avoid messing with functions. I'm OK with CSS, but not PHP, so -- Is there (or could there be) an option to set the Thematic thumbnail default to "no," or somehow opt to use the WP Featured Image instead if it's already in use? If I remove the Featured Image for the post I get no thumbnail at all...

    Thanks again for your help.

    Posted 8 years ago #
  5. On the run will, check back in later with a possible solution.

    Posted 8 years ago #
  6. illustrata
    Member

    Color me totally impressed, no matter how it turns out. :o

    Posted 8 years ago #
  7. Hi,
    You could try this simple function

    function my_post_thumbs() {
    	$rval = true;
    	if(is_archive()) {
    		$rval=false;
    	}
    	return $rval;
    }
    
    add_filter('thematic_post_thumbs','my_post_thumbs');

    You may need to change the conditional depending on your setup, but this will stop thematic displaying the thumbnail in the thematic_content() if it matches the conditional.

    see http://codex.wordpress.org/Conditional_Tags

    If you want to disable thematics thumbnail display completely you could just use...

    function my_post_thumbs() {
    	return false;
    }
    
    add_filter('thematic_post_thumbs','my_post_thumbs');

    I hope this helps

    Posted 8 years ago #
  8. illustrata
    Member

    Huzzah! The first solution worked fabulously for me.

    I went to add the code in the functions.php, and also found this:

    //add thumbnails to category page
    
    function my_post_content($title) {
    if (is_category()) {
    return get_the_post_thumbnail(NULL, 'thumbnail') . $title;
    } else {
    return $title;
    }
    }
    add_filter('thematic_post', 'my_post_content');

    I took it out before adding yours and I got scaled thumbnails, but no dupes. Now both sets of code are there and it's working as it was before.

    I will have to study this a bit, but thank you so much again for your help.

    Posted 8 years ago #
  9. I am having the same duplicate thumbnails problem as cookieandkate. I tried implementing both of janimal's suggestions in my child theme's functions.php file but I got the white screen of death and a FATAL ERROR message: Fatal error: Cannot redeclare the_post_thumbnail() (previously declared in /home/writeli2/public_html/zenangie.co.uk/blog/wp-content/themes/zenangie-5/functions.php:36) in /home/writeli2/public_html/zenangie.co.uk/blog/wp-includes/post-thumbnail-template.php on line 50.

    I have removed all references to the_post_thumbnail in my functions.php file and I am still getting this error message.

    I am trying to use thumbnails with excerpts on my home page. To do this I used the code supplied by helgatheviking on this forum: http://forums.themeshaper.com/topic/adding-thumbnails-to-posts-on-home-page.

    I have now removed this but I think something is still conflicting with wp-includes/post-thumbnail-template.php. Unfortunately, I do not know enough php to work my way around it.

    Any help would be most appreciated as this is the second day I am spending trying to work out this problem. Everything was fine on my local MAMP environment, but then I uploaded to the host server and upgraded to Thematic 09.7.7 yesterday and everything went stir crazy!!

    Posted 8 years ago #
  10. Update: janimal - thank you!
    I closed everything down, retried posting this bit of code:
    function my_post_thumbs() {
    return false;
    }
    add_filter('thematic_post_thumbs','my_post_thumbs');

    and it worked - no more fatal error message and no more duplicate thumbnails. Yay!

    Posted 8 years ago #
  11. Thank you, janimal! I tried each of your solutions. They each did the trick but I stuck with the second one so the thematic thumbnails wouldn't surprise me by showing up anywhere else.

    However, before I upgraded to the latest version, the line containing my categories, tags and comment info on the category pages displayed directly underneath, and to the left of, the thumbnail images. Now that line of text has scooted down underneath the thumbnail. Does anyone know what's up with that?

    Thank you for your help, everyone. I'm so glad I can came to the forums for help.

    Posted 8 years ago #
  12. No problem.

    I would suggest creating a new thread for your new problem and post the function from your functions.php that inserts the thumbnail (search for get_the_post_thumbnail())

    oh and mark this thread resolved :)

    Posted 8 years ago #
  13. antony09
    Member

    I recommend Clone Remover. This is program for finding duplicate files, such as photo files, music files, and image files. It has the following ways to search for duplicate files: search by content, search by properties, files with a zero size.
    http://www.moleskinsoft.com

    Posted 8 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.