Support » Fixing WordPress » Show Category Thumbails on Homepage

  • Hi Everyone,

    I would really like to know how to show category thumbnails on the homepage. Now recent posts are shown from different categories, but I would like to replace these posts in category thumbnails / category navigation.
    See for what I mean. So I would like to show thumbnails for cat 1, cat 2 and cat 3 instead of the posts of these categories.

    My theme (Acquisto, Press75) is using a loop-gallery.php file. Could I change this file to show the wanted thumbnails? Below the content of the file;

    	if (is_home()) {
    		$blog_cat = get_option('of_blog_category');
    		$category_id = get_cat_ID( $blog_cat );
    		$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    <div id="category-<?php the_ID(); ?>" <?php post_class('gallery-item') ?>>
    	<a href="<?php the_permalink() ?>" title="<?php the_title_attribute(); ?>"><img src="<?php bloginfo('template_url'); ?>/timthumb.php?src=<?php $image_one="image_one"; echo get_post_meta($post->ID, $image_one, true); ?>&h=138&w=138" alt="Product Image 1" /></a>
    	<h2><a href="<?php the_permalink() ?>" title="<?php the_title_attribute(); ?>"><?php the_short_title('', '.', true, '110') ?></a></h2>
    	<a class="price" href="<?php the_permalink() ?>" title="<?php the_title_attribute(); ?>"><?php echo get_option('of_currency_symbol'); ?><?php $get_eshop_product="price"; echo get_post_meta($post->ID, $get_eshop_product, true); ?></a>
    </div> <!-- gallery-item -->
    <?php endwhile; else : ?>
    <div id="post-content" class="block">
    	<h2 class="block-heading">Sorry, wij hebben helaas niet wat u zoekt..</h2>
    	<p>What you are searching for isn't here. It is recommended that you search for something else, or click "Home" above to start from the Home Page.</p>
    <?php endif; ?>

    Thanks a lot!

  • The topic ‘Show Category Thumbails on Homepage’ is closed to new replies.