GavickPro / Meet-GavernWP

Meet GavernWP is a responsive free Wordpress theme
35 stars 23 forks source link

Thickbox not work properly on image without caption #211

Closed Fiskaperdana closed 11 years ago

Fiskaperdana commented 11 years ago

HI MeetgavernWP developer, i try to explore again MeetgavernWP 1.7. Look like, there are some bug i found.

  1. Thickbox not work properly on image without caption. When i click image, browser directly go to image file path. no pop-up. (i tested on chrome, Mozila firefox & Opera)
  2. Thickbox not work on featured image.
  3. On Image with caption, thickbok work good but For small improvement, can you add caption on image pop-up? , or can you add some style of thickbox.?

thanks before.

whith caption thickbox work good

withot caption direcly go to image path

dziudek commented 11 years ago

Hi,

1) Thickbox in the Meet GavernWP themes work only with the following selectors:

div.wp-caption a
a.thickbox
area.thickbox
input.thickbox

So in your case for your images without the thickbox class, you should use the thickbox class in the link around the image.

2) In my opinion it is not necessary, because the featured images are big - thickbox should be used to enlarge smaller images. If you really need to add thickbox you can edit file layouts/content.post.featured.php and change fragment:

<?php the_post_thumbnail(); ?>

to:

<?php
$url = wp_get_attachment_url( get_post_thumbnail_id( $post->ID ) );
$title = gk_post_thumbnail_caption();
?>

<a href="<?php echo $url; ?>" title="<?php echo $title; ?>" class="thickbox">
<?php the_post_thumbnail(); ?>
</a>

3) You have to just add manually the title attribute in the link around the image with caption.

Fiskaperdana commented 11 years ago

@dziudek oke I get it... Thanks very much...