![]() |
|
||||||
|
|
Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
Hello,
I managed to get the 'recent photos' to show the relevant category thumbnails for that category being viewed. However after you click on one of the recent photos thumbnails, the next page it brings up has the thumbnails from all categories below it. Can I get it to show just the recent photos from the same category? It also says 'comments are closed' on those pages, how can i get rid of them? eg http://meyouphotography.com/?p=114 Thanks for your help |
|
#2
|
||||
|
||||
|
For the comments open index.php and delete this:
Code:
<div class="commentsleft">
<?php comments_template('',true); ?>
</div>
http://codex.wordpress.org/Conditional_Tags
__________________
John "Nicolas Flamel" Wright | SoZo's design | John Wright Photography New to Genesis? Check out Genesis Explained. "We are the music makers, and we are the dreamers of dreams..." - Arthur O'Shaughnessy "Some days even my lucky rocket ship underpants don't help" - Calvin StudioPress on Facebook |
|
#3
|
|||
|
|||
|
Thanks.
I don't know enough php to do the conditional statements. But found a post by steveayres with the following code for recent.php which did the job: <div id="photos"> <?php $categories = get_the_category(); $category = $categories[0]; $cat_ID = $category->cat_ID;?> <h3>Recent <?php echo($category->cat_name);?> Photography</h3> <?php $recent = new WP_Query("cat=$cat_ID&showposts=10"); while($recent->have_posts()) : $recent->the_post();?> [img]<?php echo get_post_meta($post->ID, [/img]" alt="<?php the_title(); ?>" /> <?php endwhile; ?> </div> |
|
#4
|
||||
|
||||
|
Great! Glad you got it figured out.
__________________
John "Nicolas Flamel" Wright | SoZo's design | John Wright Photography New to Genesis? Check out Genesis Explained. "We are the music makers, and we are the dreamers of dreams..." - Arthur O'Shaughnessy "Some days even my lucky rocket ship underpants don't help" - Calvin StudioPress on Facebook |
|
#5
|
|||
|
|||
|
just as an fyi to others who read this. Adew posted a solution to getting the thumbnails to be from categories in one of the other posts also discussing categorical thumbnails. Solution also uses conditional statements but within just one recent.php file and it works! :D.
|
|
#6
|
||||
|
||||
|
Care to provide a link?
__________________
John "Nicolas Flamel" Wright | SoZo's design | John Wright Photography New to Genesis? Check out Genesis Explained. "We are the music makers, and we are the dreamers of dreams..." - Arthur O'Shaughnessy "Some days even my lucky rocket ship underpants don't help" - Calvin StudioPress on Facebook |
|
#7
|
|||
|
|||
|
Thanks for the code on removing the closed comments. worked like a charm. my site is looking much better now :).
Link for the thumbnails by category that also uses conditional statement is viewtopic.php?f=32&t=6442&start=40 Adew's code that did finally work is on page 3. |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| I think I removed thumbnails from posts pages and my home page- can I get them back? | sashafarmer | General Discussion | 1 | 06-24-2010 04:17 PM |
| Changing Thumbnails from most Recent to a specifc Category | buzybonnie | General Discussion | 2 | 08-21-2009 09:17 AM |
| Link on thumbnails in recent.php | arombauts | General Discussion | 3 | 06-01-2009 08:41 PM |
| Customize recent.php to limit thumbnails by category | Sandra | General Discussion | 9 | 05-20-2009 02:23 PM |
| Recent Comments and Thumbnails | thefirsttouch | General Discussion | 1 | 12-26-2008 09:18 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