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
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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.