Exemple #1
0
function dt_image($width, $height, $link = true)
{
    $custom = get_post_meta(get_the_ID(), 'dt_custom_thumbnail', true);
    if ($custom != '') {
        $image = dt_resize('', $custom, $width, $height, true);
        echo '<img src="' . $image['url'] . '" width="' . $image['width'] . '" height="' . $image['height'] . '" alt="" />';
    } else {
        if (has_post_thumbnail()) {
            $thumb = get_post_thumbnail_id(get_the_ID());
            $image = dt_resize($thumb, '', $width, $height, true);
            echo '<img src="' . $image['url'] . '" width="' . $image['width'] . '" height="' . $image['height'] . '" alt="" />';
        }
    }
}
                        <?php 
            if ($attachments) {
                ?>

                        <div class="slides_container">

                        <?php 
                foreach ($attachments as $attachment) {
                    ?>

                            <?php 
                    $format = get_post_format();
                    $src = wp_get_attachment_image_src($attachment->ID, array('9999', '9999'), false, '');
                    $src = $src[0];
                    $image = dt_resize($attachment->ID, $src, 620, '', true);
                    ?>

                        	<div>

                        	<span class="overlay-icon overlay-<?php 
                    echo $format;
                    ?>
"><a rel="group-<?php 
                    the_ID();
                    ?>
" class="colorbox-<?php 
                    echo $format;
                    ?>
" href="<?php 
                    echo $src;
Exemple #3
0
            ?>

                    <!--END #slides -->
					</div>

				<?php 
        } elseif (has_post_thumbnail() && get_option('dt_blog_image') != 'false') {
            ?>

					<?php 
            dt_overlay_icon();
            ?>

					<?php 
            $thumb = get_post_thumbnail_id(get_the_ID());
            $image = dt_resize($thumb, '', 620, '', true);
            echo '<img src="' . $image['url'] . '" width="' . $image['width'] . '" height="' . $image['height'] . '" alt="" />';
            ?>

				<?php 
        }
        ?>

			<!--END .featured-image -->
			</div>

			<!--BEGIN .post-content -->
			<div class="post-content">
				<?php 
        the_content();
        ?>