nikiniki9doors Posted April 28, 2011 Share Posted April 28, 2011 Hey I have this blog http://www.nikita-andrews.com/ingrid/?page_id=34 ... Im trying to remove the prettyphoto enlargement on posts to this page ... and not sure how to go about it. The code for thumbnail.php is <?php if (has_post_thumbnail()) { $data = get_post_meta( $post->ID, 'key', true ); if ($data[ 'project_link' ]) { ?> <a class="externalLink tooltip" title="View Live Site" target="_blank" href="<?php echo $data[ 'project_link' ]; ?>">∞</a> <?php } ?> <?php $large_image_url = wp_get_attachment_image_src( get_post_thumbnail_id(), 'large'); if ($data[ 'video_link' ]) { ?> <a class="thumbLink video" rel="prettyPhoto" href="<?php echo $data[ 'video_link' ]; ?>"> <?php } else { echo '<a class="thumbLink" href="' . $large_image_url[0] . '" title="' . the_title_attribute('echo=0') . '" >'; } the_post_thumbnail(); echo '</a>'; } ?> I want the thumbnails to still show but just not enlarge. Infact itd be even better if they just linked directly to the post itself. Any help would be much appreciated! Quote Link to comment https://forums.phpfreaks.com/topic/235003-blog-php-help/ Share on other sites More sharing options...
JKG Posted April 28, 2011 Share Posted April 28, 2011 just delete: rel="prettyPhoto" that will stop it working effectively, but you will still load all styles and scripts to do with it... Quote Link to comment https://forums.phpfreaks.com/topic/235003-blog-php-help/#findComment-1207741 Share on other sites More sharing options...
nikiniki9doors Posted April 28, 2011 Author Share Posted April 28, 2011 didnt work the prettyphoto still loads and on rollover the icon still shows? Quote Link to comment https://forums.phpfreaks.com/topic/235003-blog-php-help/#findComment-1207745 Share on other sites More sharing options...
nikiniki9doors Posted April 28, 2011 Author Share Posted April 28, 2011 I just want the small thumbnail to show. I dont want to be able to click on it and have it enlarge. If it could be clicked and linked to the post that'd be great ... but I dont want it to enlarge Quote Link to comment https://forums.phpfreaks.com/topic/235003-blog-php-help/#findComment-1207749 Share on other sites More sharing options...
JKG Posted April 28, 2011 Share Posted April 28, 2011 <?php if (has_post_thumbnail()) { the_post_thumbnail(); } ?> will probably just show the image. what application are you using? Quote Link to comment https://forums.phpfreaks.com/topic/235003-blog-php-help/#findComment-1207761 Share on other sites More sharing options...
nikiniki9doors Posted April 28, 2011 Author Share Posted April 28, 2011 wordpress Quote Link to comment https://forums.phpfreaks.com/topic/235003-blog-php-help/#findComment-1207766 Share on other sites More sharing options...
JKG Posted April 28, 2011 Share Posted April 28, 2011 yeah sorry, figured it out, asked when i was eating my tea! <?php if (has_post_thumbnail()) { ?> <a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_post_thumbnail(); ?></a> <?php } ?> will make the image a link to the post. change twentyten to your theme name which is: wpwave so <?php if (has_post_thumbnail()) { ?> <a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'wpwave' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_post_thumbnail(); ?></a> <?php } ?> should do it. Quote Link to comment https://forums.phpfreaks.com/topic/235003-blog-php-help/#findComment-1207767 Share on other sites More sharing options...
nikiniki9doors Posted April 28, 2011 Author Share Posted April 28, 2011 That code worked. Is there any way to link that thumbnail now to the post? Quote Link to comment https://forums.phpfreaks.com/topic/235003-blog-php-help/#findComment-1207768 Share on other sites More sharing options...
JKG Posted April 28, 2011 Share Posted April 28, 2011 look at the edit. and mark as solved. Quote Link to comment https://forums.phpfreaks.com/topic/235003-blog-php-help/#findComment-1207771 Share on other sites More sharing options...
nikiniki9doors Posted April 28, 2011 Author Share Posted April 28, 2011 sweet!! thanks so much. You rock!! Quote Link to comment https://forums.phpfreaks.com/topic/235003-blog-php-help/#findComment-1207776 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.