ThemeShaper Forums » Thematic

[closed]

Gallery Child theme and shadowbox

(3 posts)
  • Started 3 years ago by bhomatude
  • Latest reply from bhomatude
  • This topic is not resolved
  1. bhomatude
    Member

    I utilized some extra code for the functions.php that was developed from here:

    http://wordpress.org/support/topic/364150?replies=11#post-1558641

    in order to have a page of post thumbnails that launch embedded video using shadowbox.

    And then I hacked a bit of one part of the code here:

    if( $first_attachement ) { ?>
    <?php $first_img_name = apply_filters('the_title', $first_attachement->post_title); ?>
    ID); ?>" rel="shadowbox;height=405;width=720[<?php echo $post->post_name; ?>]" title="<?php echo $first_img_name; ?>"><img class="thumbnail2" src="<?php if(get_post_meta($post->ID, 'thumbnail2', $single = true)){echo get_post_meta($post->ID, 'thumbnail2', $single = true);} else{bloginfo('url'); echo "/wp-content/themes/gallery/images/thumbnail-default.jpg";} ?>" width="125" height="125" alt="<?php echo the_title() ?>"</span>
    <img class="thumbnail" src="<?php if(get_post_meta($post->ID, 'thumbnail', $single = true)){echo get_post_meta($post->ID, 'thumbnail', $single = true);} else{bloginfo('url'); echo "/wp-content/themes/gallery/images/thumbnail-default.jpg";} ?>" width="125" height="125" alt="<?php echo the_title() ?>" />

    <?php }
    ?>

    Note that I added a call to 'thumbnail2' (which was also added in the post options in wordpress dashboard) to display a 2nd thumbnail for the hover effect. It works in safari and firefox. There is probably a much better way of doing this as I just kind of bumbled my way through it. Any thoughts on prettying that up?

    Chris Wallace's site has been up and down the past couple of days so I'm posting here. I found that shadowbox did not automatically scale to the size of the video and so I had to hard code a default size (see below) This is fine if all the videos are the same aspect ratio and size, but not so fine if they are different.

    rel="shadowbox;height=405;width=720

    I have a demo just checking out the functionality here:

    http://www.buddhasuncle.com/jordan/

    Any thoughts?

    Posted 3 years ago #
  2. bhomatude
    Member

    I do have one question beyond the general:

    <?php echo $first_img_name; ?>"

    This displays the name of the image above the shadowbox enlargement. I'd like to have the flexibility of displaying the_excerpt instead... But I'm not sure about the correct syntax here.

    Posted 3 years ago #
  3. bhomatude
    Member

    Nevermind... Got it.

    title="<?php echo the_excerpt(); ?>"

    Posted 3 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.