StudioPress Community Forums
  StudioPress Community Forums > Forums > General Discussion
For help and support, access to your downloads, or to manage your account please log into My StudioPress.

These forums have been set to read-only so you can browse the existing topics for any questions you may have.

For general discussion on WordPress, CSS and design (NOT for support) visit the new Community Forums.
 
 
Thread Tools Display Modes
  #1  
Old 08-10-2009, 07:46 AM
excitedrod excitedrod is offline
Registered User
Genesis Member
 
Join Date: Aug 2009
Posts: 8
Default category recent thumbnails reverts back to mixed thumbnails

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  
Old 08-10-2009, 08:01 AM
SoZo's Avatar
SoZo SoZo is offline
Community Moderator
 
Join Date: Oct 2008
Location: Minneapolis, Minnesota
Posts: 47,500
Default Re: category recent thumbnails reverts back to mixed thumbnails

For the comments open index.php and delete this:
Code:
<div class="commentsleft">
		
			<?php comments_template('',true); ?>
			
		</div>
And to get different recent photos for each category you will need to create several different recent.php files and then set some sort of conditional statement to call the appropriate file also in index.php

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  
Old 08-10-2009, 07:56 PM
excitedrod excitedrod is offline
Registered User
Genesis Member
 
Join Date: Aug 2009
Posts: 8
Default Re: category recent thumbnails reverts back to mixed thumbnails

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  
Old 08-10-2009, 08:07 PM
SoZo's Avatar
SoZo SoZo is offline
Community Moderator
 
Join Date: Oct 2008
Location: Minneapolis, Minnesota
Posts: 47,500
Default Re: category recent thumbnails reverts back to mixed thumbnails

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  
Old 08-25-2009, 01:27 AM
buzybonnie buzybonnie is offline
Registered User
Pro Plus Member
 
Join Date: Mar 2009
Posts: 27
Default Re: category recent thumbnails reverts back to mixed thumbnails

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  
Old 08-25-2009, 01:57 AM
SoZo's Avatar
SoZo SoZo is offline
Community Moderator
 
Join Date: Oct 2008
Location: Minneapolis, Minnesota
Posts: 47,500
Default Re: category recent thumbnails reverts back to mixed thumbnails

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  
Old 08-25-2009, 08:34 AM
buzybonnie buzybonnie is offline
Registered User
Pro Plus Member
 
Join Date: Mar 2009
Posts: 27
Default Re: category recent thumbnails reverts back to mixed thumbnails

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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

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


All times are GMT -5. The time now is 08:37 AM.

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.