Jump to content
Sign in to follow this  
susieusa-ctccom

Thumbnails on category pages, but not on single post pages

Recommended Posts

susieusa-ctccom

Hi Pagelines I read about this very same issue on the StationPro support area (here: http://www.pagelines.com/forum/topic.php?id=2859), but it seems that the solution is not working on the _posts.php file for EcoPro. Any ideas how to get thumbnails to show everywhere EXCEPT individual post pages on the EcoPro theme? Here is a category page, which is the way we want it: http://blogs.america.gov/category/bythepeople/ Here is an individual post, where we do not want the thumbnail to show: http://blogs.america.gov/bythepeople/2010/10/18/child-soldiers-%e2%80%93-it-impacts-all-of-us/ Thanks much P.S. Perhaps this would be a good thing to put in the Theme Options next time there is an update - it seems most useres would want thumbnails everywhere except inidividual post pages.

Share this post


Link to post
Share on other sites
susieusa-ctccom

P.P.S. This is what the thumbnail line looks like from the _posts.php file in our version of EcoPro: <?php if(!pl_show_thumb($post->ID)) echo 'post-nothumb';?>

Share this post


Link to post
Share on other sites
cmunns

What version are you using? In the most recent EcoPro _posts.php is actually _theloop.php... I would need to see more of your code if that's the case.

Share this post


Link to post
Share on other sites
susieusa-ctccom

Hi Adam...looks like we're using 1.1.4. I don't see a file in Library called _theloop.php, so I'm just assuming the code I need to modify woudl be in _posts.php. Let me know if you need any more info.

Share this post


Link to post
Share on other sites
cmunns

_theloop.php would be in the root, but regardless just let me see the code for wherever you see the thumbnail being handled.

Share this post


Link to post
Share on other sites
susieusa-ctccom

Here's the full code from _posts.php <?php if(is_single()):?> <div class="post-nav fix"> <span class="previous"><?php previous_post_link('%link') ?></span> <span class="next"><?php next_post_link('%link') ?></span></div> <?php endif;?> <?php if (!is_404() && have_posts()) : while (have_posts()) : the_post(); ?> <div class="postwrap"> <div <?php post_class() ?> id="post-<?php the_ID(); ?>"> <div class="copy fix"> <?php if(pl_show_thumb($post->ID)): ?> <div class="post-thumb"> " rel="bookmark" title="<?php _e('Permanent Link To', TDOMAIN);?> <?php the_title_attribute();?>"> <?php the_post_thumbnail('thumbnail');?> </div> <?php endif; ?> <div class="post-header fix <?php if(!pl_show_thumb($post->ID)) echo 'post-nothumb';?>"> <div class="post-title-section fix"> <div class="post-title fix"> <h2>" rel="bookmark" title="<?php _e('Permanent Link to',TDOMAIN);?> <?php the_title_attribute(); ?>"><?php the_title(); ?></h2> <div class="metabar"> <?php _e('On',TDOMAIN);?> <?php the_time(get_option('date_format')); ?>, <?php _e('in',TDOMAIN);?> <?php the_category(', ') ?>, <?php _e('by',TDOMAIN);?> <?php link_to_the_author(); ?> <?php edit_post_link(__('(Edit Post)', TDOMAIN), ' ', ' ');?> </div> </div> <div class="post-comments"> #comments" title="<?php _e('View Comments', TDOMAIN);?>"><span><?php comments_number(0, 1, '%'); ?></span> </div> </div> <!--/post-title --> <?php if(pl_show_excerpt($post->ID)):?> <div class="post-excerpt"> <?php the_excerpt(); ?> </div> <?php if(is_home() && !pl_show_content($post->ID)):?> "> <?php e_pagelines('post_footer_text', __('Continue Reading', TDOMAIN));?> <?php endif;?> <?php endif; ?> </div> </div> <?php if(pl_show_content($post->ID)):?> <div class="copy"> <div class="post-content"> <?php the_content(); ?> <?php if(is_single()) link_pages(__('<p>Pages: ',TDOMAIN), '</p>', 'number'); ?> <?php edit_post_link(__('Edit Post',TDOMAIN), '', '');?> </div> <div class="tags"> <?php the_tags(__('Tagged with: ', TDOMAIN),' • ',''); ?> </div> </div> <?php if(is_single() && pagelines('authorinfo') && VPRO):?> <?php include(THEME_LIB.'/_authorinfo.php');?> <?php endif;?> <?php endif;?> <?php include(THEME_LIB.'/_post_footer.php');?> </div><!--post --> </div> <?php if(is_single()):?> <?php include(THEME_LIB.'/_contentsidebar.php');?> <?php include(THEME_LIB.'/_commentsform.php');?> <?php endif; endwhile; ?> <?php include(THEME_LIB.'/_pagination.php');?> <?php else : ?> <div class="billboard"> <?php if(is_404()):?> <h2 class="center"><?php _e('Sorry! Error 404 - Page Not Found',TDOMAIN);?></h2> <?php else:?> <h2 class="center"><?php _e('Nothing Found',TDOMAIN);?></h2> <?php endif;?> <p class="center"><?php _e('Sorry, what you are looking for isn't here.',TDOMAIN);?></p> <div class="center fix"><?php include (THEME_LIB . '/_searchform.php'); ?></div> </div> <?php endif; ?>

Share this post


Link to post
Share on other sites
susieusa-ctccom

Also, this section of code was in functions_library.php: } function pl_show_thumb($post = null){ // 'blog' => 'Only on blog pages and search', // 'single'=> 'Only on single post pages', // 'all' => 'All blog/post pages', // 'hide' => 'Don't show', if( function_exists('the_post_thumbnail') && has_post_thumbnail($post)){ // show on single post pages only if(is_single() && pagelines('pl_postthumbs') == "single") return true; // show only on posts and search pages if((is_home() || is_search()) && pagelines('pl_postthumbs') == "blog") return true; // show on all posts pages if(pagelines('pl_postthumbs') == "all" || !pagelines('pl_postthumbs')) return true; if(pagelines('pl_postthumbs') == "hide") return false; // old method if(is_single() && pagelines('excerptshidesingle')) return false; else return false; } else return false; }

Share this post


Link to post
Share on other sites
cmunns

cool. Okay it should work if you make this ` <?php if(pl_show_thumb($post->ID)): ?>

" rel="bookmark" title="<?php _e('Permanent Link To', TDOMAIN);?> <?php the_title_attribute();?>"> <?php the_post_thumbnail('thumbnail');?> ` into this; ` <?php if(!is_single() && pl_show_thumb($post->ID)): ?>
" rel="bookmark" title="<?php _e('Permanent Link To', TDOMAIN);?> <?php the_title_attribute();?>"> <?php the_post_thumbnail('thumbnail');?> `

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×