<?php 
    if (has_post_thumbnail()) {
        ?>

        <div id="property-featured-image" class="clearfix only-for-print">
            <?php 
        $image_id = get_post_thumbnail_id();
        $image_url = wp_get_attachment_url($image_id);
        echo '<a href="' . $image_url . '" class="' . get_lightbox_plugin_class() . '" ' . generate_gallery_attribute() . '>';
        echo '<img src="' . $image_url . '" alt="' . get_the_title() . '" />';
        echo '</a>';
        ?>

        </div>
        <?php 
    }
} elseif (has_post_thumbnail()) {
    ?>

    <div id="property-featured-image" class="clearfix">
        <?php 
    $image_id = get_post_thumbnail_id();
    $image_url = wp_get_attachment_url($image_id);
    echo '<a href="' . $image_url . '" class="' . get_lightbox_plugin_class() . '" ' . generate_gallery_attribute() . '>';
    echo '<img src="' . $image_url . '" alt="' . get_the_title() . '" />';
    echo '</a>';
    ?>

    </div>
    <?php 
}
Example #2
0
                                        <div <?php 
        post_class("gallery-item isotope-item {$term_list}");
        ?>
 >
                                            <?php 
        $image_id = get_post_thumbnail_id();
        $full_image_url = wp_get_attachment_url($image_id);
        global $gallery_image_size;
        $featured_image = wp_get_attachment_image_src($image_id, $gallery_image_size);
        ?>

                                            <figure>
                                                <div class="media_container">
                                                    <a class="<?php 
        echo get_lightbox_plugin_class();
        ?>
 zoom" <?php 
        echo generate_gallery_attribute();
        ?>
 href="<?php 
        echo $full_image_url;
        ?>
" title="<?php 
        the_title();
        ?>
"></a>
                                                    <a class="link" href="<?php 
        the_permalink();
        ?>
"></a>
Example #3
0
        the_ID();
        ?>
" <?php 
        post_class("clearfix");
        ?>
>
                                        <h3 class="post-title"><?php 
        the_title();
        ?>
</h3>
                                        <hr/>
                                        <?php 
        if (has_post_thumbnail()) {
            $image_id = get_post_thumbnail_id();
            $image_url = wp_get_attachment_url($image_id);
            echo '<a class="' . get_lightbox_plugin_class() . '" href="' . $image_url . '" title="' . get_the_title() . '" >';
            the_post_thumbnail('post-featured-image');
            echo '</a>';
        }
        the_content();
        // WordPress Link Pages
        wp_link_pages(array('before' => '<div class="pages-nav clearfix">', 'after' => '</div>', 'next_or_number' => 'next'));
        ?>

                                </article>
                                <?php 
    }
    comments_template();
}
?>
Example #4
0
 function generate_gallery_attribute()
 {
     $lightbox_plugin_class = get_lightbox_plugin_class();
     if ($lightbox_plugin_class == 'pretty-photo') {
         return 'data-rel="prettyPhoto[real_homes]"';
     }
     return '';
 }