Thread Starter
CHEWX
(@chewx)
Hacked to pieces Gallery Widget. Just don’t update plug-in as it will overwrite /core/class_widgets.php
<div id="slider" class="flexslider">
<ul class="slides"><?php
foreach($gallery as $image) {
$thumb_image = wpp_get_image_link($image['attachment_id'], $image_type);
?>
<li>
<?php if(!empty($big_image_type)) : ?>
<?php $big_image = wpp_get_image_link($image['attachment_id'], $big_image_type); ?>
<img src="<?php echo $thumb_image; ?>" title="<?php echo esc_attr($image['post_excerpt'] ? $image['post_excerpt'] : $image['post_title'] . ' - ' . $post->post_title); ?>" alt="<?php echo esc_attr($image['post_excerpt'] ? $image['post_excerpt'] : $image['post_title']); ?>" />
<?php else : ?>
<img src="<?php echo $thumb_image; ?>" title="<?php echo esc_attr($image['post_excerpt'] ? $image['post_excerpt'] : $image['post_title'] . ' - ' . $post->post_title); ?>" alt="<?php echo esc_attr($image['post_excerpt'] ? $image['post_excerpt'] : $image['post_title']); ?>" class="wpp_gallery_widget_image size-thumbnail " width="<?php echo $thumbnail_dimensions['width']; ?>" height="<?php echo $thumbnail_dimensions['height']; ?>" />
<?php endif; ?>
</li>
<?php
$real_count++;
if(!empty($gallery_count) && $gallery_count == $real_count) {
break;
}
}?></ul>
</div>
<div id="carousel" class="flexslider">
<ul class="slides">
<?php
foreach($gallery as $image) {
$thumb_image = wpp_get_image_link($image['attachment_id'], $image_type);
?>
<li>
<?php if(!empty($big_image_type)) : ?>
<?php $big_image = wpp_get_image_link($image['attachment_id'], $big_image_type); ?>
<img src="<?php echo $thumb_image; ?>" title="<?php echo esc_attr($image['post_excerpt'] ? $image['post_excerpt'] : $image['post_title'] . ' - ' . $post->post_title); ?>" alt="<?php echo esc_attr($image['post_excerpt'] ? $image['post_excerpt'] : $image['post_title']); ?>" />
<?php else : ?>
<img src="<?php echo $thumb_image; ?>" title="<?php echo esc_attr($image['post_excerpt'] ? $image['post_excerpt'] : $image['post_title'] . ' - ' . $post->post_title); ?>" alt="<?php echo esc_attr($image['post_excerpt'] ? $image['post_excerpt'] : $image['post_title']); ?>" class="wpp_gallery_widget_image size-thumbnail " width="<?php echo $thumbnail_dimensions['width']; ?>" height="<?php echo $thumbnail_dimensions['height']; ?>" />
<?php endif; ?>
</li>
<?php
$real_count++;
if(!empty($gallery_count) && $gallery_count == $real_count) {
break;
}
}?></ul>
</div>
Anyone see a better solution ?