Support » Themes and Templates » Editing categorie to show thumbnails

  • Hi,

    I installed WordPress and the morning after theme and am now exploring it to see if it will work with my site. I am planning
    to move to wordpress, using it as a cms with (a tweaked) tma as theme.

    It’s a website with partypictures, one of the categories is named Photo’s. I want that categorie
    to show a set of thumbnails. I have allready edited the archive page (archive.php) to display
    thumbs instead of the complete posts. The thumbs are now being stacked on top of each other.

    The question is:
    How do i get the thumbnails to appear 3 in a row, then another 3 and so on.
    In total there should be (for example) 12 thumbs in 4 rows each with 3 thumbs a row.

    I have enclosed screenshots to help explain what i mean. The code below (of archive.php) results in the first image shown below.
    Please let me know if you need more information in order to help me/point me in the right direction.

    My archive so far:

    An example of what i am trying to accomplish:

    I am also adding my archive.php:

    <?php get_header(); ?>        
            <div id="topbanner_arch" class="column span-14">   <!-- start top banner -->
                <div class="pagetitle">
                    // Foto archief
            </div>   <!-- end top banner -->
            <div id="arch_content" class="column span-14">   <!-- start home_content -->
            <?php if (have_posts()) : ?>
            	<div class="column span-3 first">
            		<?php if (is_category()) { ?>
                	<h2 class="archive_name"><?php echo single_cat_title(); ?></h2>        
                	<div class="archive_meta">
                		<!--<div class="archive_feed">
                			<?php $cat_obj = $wp_query->get_queried_object(); $cat_id = $cat_obj->cat_ID; echo '<a href="'; get_category_rss_link(true, $cat, ''); echo '">RSS feed for this section</a>'; ?>
                		<?php $cat_count = $cat_obj->category_count; ?>
                		<div class="archive_number">
                			This category contains <?php echo $cat_count . ($cat_count==1?" post":" posts") ?>
                		</div> -->           
    				<?php } elseif (is_tag()) { ?>
                	<h2 class="archive_name"><?php single_tag_title(); ?></h2>        
                	<div class="archive_meta">
                		<div class="archive_number">
                			This tag is associated with <?php $tag = get_tags(); if ($tag) { $tag = $tag[0]; echo $tag->count; } ?> posts
    				<?php } elseif (is_day()) { ?>
    				<h2 class="archive_name">Archive for <?php the_time('F jS, Y'); ?></h2>
    				<?php } elseif (is_month()) { ?>
    				<h2 class="archive_name">Archive for <?php the_time('F, Y'); ?></h2>
    				<?php } elseif (is_year()) { ?>
    				<h2 class="archive_name">Archive for <?php the_time('Y'); ?></h2>
    				<?php } ?>
                <div class="column span-8">
                  <?php while (have_posts()) : the_post(); ?>
                  <div class="archive_post_block">
    <div class="archive_post_meta">
                		<h4 class="archive_title" id="post-<?php the_ID(); ?>"><a>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h4><?php the_time('F j, Y'); ?></div>
       <div class="thumb_archives"><a>" title="<? the_title(); ?>"><img src="<? echo get_post_meta($post->ID, 'thumb_archives', true) ?>" /></a></div>
                	<?php endwhile; ?>
    				<div class="navigation">
    					<?php next_posts_link('� Previous') ?> — <?php previous_posts_link('Next �') ?>
    				<?php else : ?>
    					Lost? Go back to the <a>/">home page</a>.
    				<?php endif; ?>
                <?php get_sidebar(); ?>
            </div>   <!-- start home_content -->
    <?php get_footer(); ?>

    Thank you in advance for your time and efforts.


Viewing 2 replies - 1 through 2 (of 2 total)
  • The technique you’ll want to use is very similar to what I explained in this recent thread.

    That is: you’ll want to wrap all your posts in a given class, and then style that class to float your posts to the left (with a width wide enough to fit three).

    I don’t have the time to muster all the details of the code for you, but I can try to answer any questions you might have.

    Thanks for the reply ikiru.

    I understand what you’re saying. Going to sit down later tonight and test it out. I’ll let you know if i succeed or when questions pop up.

    But first … of to the gym.

    Thanks and check ya later!


Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Editing categorie to show thumbnails’ is closed to new replies.