WordPress.org

Ready to get started?Download WordPress

Forums

Editing categorie to show thumbnails (3 posts)

  1. tekupdate
    Member
    Posted 6 years ago #

    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:
    http://img247.imageshack.us/img247/441/archiveoz2.jpg

    An example of what i am trying to accomplish:
    http://img247.imageshack.us/img247/6392/archiveexampleep9.jpg

    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>
            </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>'; ?>
           		  </div>
    
                		<?php $cat_count = $cat_obj->category_count; ?>
                		<div class="archive_number">
                			This category contains <?php echo $cat_count . ($cat_count==1?" post":" posts") ?>
                		</div> -->           
    
           	  </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
                		</div>           		
    
                	</div>
    
    				<?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>
    
                <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>
    
           		  </div>
    
                	<?php endwhile; ?>
    
    				<div class="navigation">
    					<?php next_posts_link('� Previous') ?> — <?php previous_posts_link('Next �') ?>
    
    				</div>
    
    				<?php else : ?>
    
    					Lost? Go back to the <a>/">home page</a>.
    
    				<?php endif; ?>
    
    </div>
    
                <?php get_sidebar(); ?>
    
            </div>   <!-- start home_content -->
    
    <?php get_footer(); ?>

    Thank you in advance for your time and efforts.
    Regards,

    Tek

  2. ikiru
    Member
    Posted 6 years ago #

    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.

  3. tekupdate
    Member
    Posted 6 years ago #

    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!

    Tek

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.