Jump to content

blog php help


nikiniki9doors

Recommended Posts

:confused:

 

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!

 

Link to comment
https://forums.phpfreaks.com/topic/235003-blog-php-help/
Share on other sites

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. :)

Link to comment
https://forums.phpfreaks.com/topic/235003-blog-php-help/#findComment-1207767
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.