Ask your WordPress questions! Pay money and get answers fast! Comodo Trusted Site Seal
Official PayPal Seal

Category Thumbnail WordPress

  • REFUNDED

I want thumbnails for the posts to show up on the category page:
[[LINK href="http://floridadogadoption.com/category/large-dogs/"]][[/LINK]]


Please help!

Answers (3)

2010-05-24

Oleg Butuzov answers:

in <em>functions.php</em>

add_theme_support( 'post-thumbnails', array( 'post' ) );
set_post_thumbnail_size( 100 , 100 , true );


in <em>category.php</em> (inside loop)

<?php
if ( has_post_thumbnail() ) { ?>
<span class="my_image">
<?php the_post_thumbnail(array(100, 100)); ?>
</span>
<?php } ?>


or for the index.php


<?php
if (is_category() && has_post_thumbnail() ) { ?>
<span class="my_image">
<?php the_post_thumbnail(array(100, 100)); ?>
</span>
<?php } ?>


zachitn comments:

Insert both of these?


zachitn comments:


add_theme_support( 'post-thumbnails', array( 'post' ) );

set_post_thumbnail_size( 100 , 100 , true );

where does this go?


Oleg Butuzov comments:

first code for functions.php shoueld be inserted to the functions.php

second for category.php if you have it.
third can be used in category.php same as in arhive.php or index.php


Oleg Butuzov comments:

functions.php is a file inside of your theme. if its not exists create it.


zachitn comments:

Fatal error: Call to undefined function add_theme_support() in /home/web1/floridadogadoption.com/htdocs/wp-includes/functions.php on line 2

whats this mean


zachitn comments:

Parse error: syntax error, unexpected $end in /home/web1/floridadogadoption.com/htdocs/wp-includes/category.php on line 382


Oleg Butuzov comments:

not wp-includes/functions.php

for the
wo-content/themems/yourtheme/functions.php


Oleg Butuzov comments:

1) there a code type so use a updated code. error in last line for template code - <em>} ?></em> should be <em><?php } ?></em>

2) typo in my last message wo-content should be wp-content.


zachitn comments:

there isnt a category page tho?

Any suggestion?


Oleg Butuzov comments:

third code for index.php


Oleg Butuzov comments:

please don't use the code for non theme files.


zachitn comments:

still no images in the category page??


Oleg Butuzov comments:

have you upload any to the posts?


Oleg Butuzov comments:

you can do the inside wp-admin posts editions or creation page. loot at right bottom there should be a meta box called featured image.

2010-05-24

Erez S answers:

You want to add thumbnails to categories? If so you can write the img url in the description and then to display <img> tag with the categories' description in the src.

2010-05-26

Michael Fields answers:

I made a really easy to use plugin for this situation. It allows you to associate images from your media library to categories, tags and any custom taxonomies that you have set up on your blog. Here's a link:

http://wordpress.org/extend/plugins/taxonomy-images/