![]() |
|
||||||
|
|
Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
Hello -
I would like to add a set of thumbnails at the top of my category.php page to show only images from the current category. referencing viewtopic.php?f=32&t=6442#p32301 I have done the following: Created a file called recent-cat.php as follows: Code:
<div id="photos-cat">
<h3>This collection</h3>
<?php $recent = new WP_Query("cat=".$image_cat."&showposts=50"); while($recent->have_posts()) : $recent->the_post();?>
[img]<?php echo get_post_meta($post->ID, [/img]" alt="<?php the_title(); ?>" />
<?php endwhile; ?>
</div>
Code:
<?php /* Template Name: Exhibits
*/ ?>
<?php get_header(); ?>
<div id="content">
<?php
$category = get_the_category();
$image_cat=$category[0]->cat_ID;
?>
<?php include(TEMPLATEPATH."/recent-cat.php");?>
<div class="contentleft">
<?php $page = (get_query_var('paged')) ? get_query_var('paged') : 1; query_posts($query_string ."&showposts=50&paged=$page"); ?>
Created a #photos-cat { style They layout looks fine but all the thumbnails are showing and not filtering for the current category. Example is at http://doughaines.vinyltangerine.com/in ... abstracts/ Any advice as to what I missed would be greatly appreciated. Best, sandra |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Eliminate limit of 15 recent posts | SacramentoBill | General Discussion | 3 | 06-19-2010 09:03 AM |
| category recent thumbnails reverts back to mixed thumbnails | excitedrod | General Discussion | 6 | 08-25-2009 08:34 AM |
| Changing Thumbnails from most Recent to a specifc Category | buzybonnie | General Discussion | 2 | 08-21-2009 09:17 AM |
| Is it possible to limit items in recent.php by category? | Whitehair | General Discussion | 2 | 07-27-2009 11:33 PM |
| Customize recent.php to use NextGen thumbnails | sunbelle | General Discussion | 3 | 05-22-2009 02:57 AM |
© Copyright 2012 Copyblogger Media LLC · StudioPress™ is a trademark of Copyblogger Media LLC
Privacy Policy | Refund Policy | Terms of Service | Affiliate Program | Contact Us