jstanj
Forum Replies Created
Viewing 2 replies - 1 through 2 (of 2 total)
-
Forum: Plugins
In reply to: [Featured Video Plus] Video Offset Featured ImageThat did it, thanks!
Thanks for the tip about php as well. I assumed you close it out like everything else, just haven’t taking the time to learn what those tages are yet.
Cheers,
JasonForum: Plugins
In reply to: [Featured Video Plus] Video Offset Featured ImageThanks. I’m not super great with php, but does this look correct?
ORIGINAL
<?php if(get_option_tree('show_featured_image') == 'Yes') : ?> <?php if (has_post_thumbnail( $post->ID )) { // Grab the URL for the thumbnail (featured image) $thumb = get_post_thumbnail_id(); $image_full = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'full' ); $imgheight = ot_get_option('default_image_height', $theme_options, false, true, 0 ); $image = vt_resize( $thumb, '', 700, $imgheight, true ); // Check for a lightbox link, if it exists, use that as the value. // If it doesn't, use the featured image URL from above. if(get_custom_field('lightbox_link')) { $lightbox_link = get_custom_field('lightbox_link'); } else { $lightbox_link = $image_full[0]; } ?> <a href="<?php echo $lightbox_link; ?>" data-rel="prettyPhoto[<?php echo $post_slug; ?>]"> <img class="aligncenter" src="<?php echo $image[url]; ?>" width="<?php echo $image[width]; ?>" height="<?php echo $image[height]; ?>" alt="<?php the_title(); ?>" /> </a> <br class="clearfix" /> <?php } else {} ?> <?php endif; ?>
EDITED
<?php if(get_option_tree('show_featured_image') == 'Yes') : ?> <?php if(function_exists('has_post_video') && has_post_video()): the_post_video(); else: if (has_post_thumbnail( $post->ID )) { // Grab the URL for the thumbnail (featured image) $thumb = get_post_thumbnail_id(); $image_full = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'full' ); $imgheight = ot_get_option('default_image_height', $theme_options, false, true, 0 ); $image = vt_resize( $thumb, '', 700, $imgheight, true ); // Check for a lightbox link, if it exists, use that as the value. // If it doesn't, use the featured image URL from above. if(get_custom_field('lightbox_link')) { $lightbox_link = get_custom_field('lightbox_link'); } else { $lightbox_link = $image_full[0]; } ?> <a href="<?php echo $lightbox_link; ?>" data-rel="prettyPhoto[<?php echo $post_slug; ?>]"> <img class="aligncenter" src="<?php echo $image[url]; ?>" width="<?php echo $image[width]; ?>" height="<?php echo $image[height]; ?>" alt="<?php the_title(); ?>" /> </a> <br class="clearfix" /> <?php } else {} ?> <?php endif; ?>
Viewing 2 replies - 1 through 2 (of 2 total)