Archieve.php same as my post page?
-
Currently i have this code running my posts page, showing categories 3,4,5,6 and if there is a multiple of 2 it prints the div.example, its working perfectly.
<?php $page = (get_query_var('paged')) ? get_query_var('paged') : 1; $postcnt = 0; query_posts("showposts=99&cat=3,4,5,6"); if (have_posts()) { ?> <div class="example"> <ul class="content_cols"> <?php while ( have_posts() ) : the_post(); $postcnt++;?> <li> <a href="<?php the_permalink() ?>" title="View more details of <?php the_title(); ?>"><img src="http://jezthompson.co.uk/ransom_note/wp-content/uploads/<?php echo $data[ 'event_image' ]; ?>" alt = "work image"/></a> <h3><?php the_title(); ?></h3> <div class="clearFix"><!--x--></div> </li> <?php if($postcnt % 2 == 0) { ?> </ul> <?php if($postcnt % 6 == 0) { ?> <div class="line"></div> <div class="clearFix"><!--x--></div> </div> <div class="example"> <?php } ?> <ul class="content_cols"> <?php } ?> <?php endwhile; ?> </ul> <div class="clearFix"><!--x--></div> </div> <?php } ?>However i need the archive.php to act the same way and i’m not sure how…
I know its something to do with this..
<?php while (have_posts()) : the_post(); $data = get_post_meta( $post->ID, 'key', true );?>When you click on a category and it just shows the posts from that particular one, i need that page to work like the above posts page really.
Any ideas…?
Many thanks.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The topic ‘Archieve.php same as my post page?’ is closed to new replies.