예제 #1
0
/**
 * Search entry thumbnail
 *
 * @package Total WordPress theme
 * @subpackage Partials
 * @version 3.3.0
 */
// Exit if accessed directly
if (!defined('ABSPATH')) {
    exit;
}
// Return if there isn't any thumbnail defined
if (!has_post_thumbnail()) {
    return;
}
?>

<div class="search-entry-thumb">
	<a href="<?php 
wpex_permalink();
?>
" title="<?php 
wpex_esc_title();
?>
" class="search-entry-img-link">
		<?php 
wpex_post_thumbnail(apply_filters('wpex_search_thumbnail_args', array('size' => 'thumbnail', 'width' => '', 'height' => '', 'alt' => wpex_get_esc_title())));
?>
	</a>
</div><!-- .search-entry-thumb -->
예제 #2
0
        ?>
                     
            
                     
                    <div id="post-media" class="<?php 
        if (!empty($bluerock_highlights3)) {
            echo 'sold ';
        }
        ?>
clr">

                        
                        
                        
                        <?php 
        echo wpex_post_thumbnail(array('size' => 'portfolio-thumby', 'alt' => wpex_get_esc_title()));
        ?>
                       
                    </div><!-- #post-media -->

                <?php 
    }
    ?>

                <h2 class="property-heading">
                    <?php 
    the_title();
    ?>
 
                </h2><!-- .single-post-title -->
                        <div class="property-location">
예제 #3
0
 /**
  * Change category thumbnail.
  *
  * @since 2.0.0
  */
 public static function subcategory_thumbnail($category)
 {
     // Get attachment id
     $attachment = get_woocommerce_term_meta($category->term_id, 'thumbnail_id', true);
     // Return thumbnail if attachment is defined
     if ($attachment) {
         wpex_post_thumbnail(array('attachment' => $attachment, 'size' => 'shop_category', 'alt' => esc_attr($category->name)));
     } else {
         echo '<img src="' . wc_placeholder_img_src() . '" alt="' . esc_html__('Placeholder Image', 'total') . '" />';
     }
 }
예제 #4
0
					<div class="<?php 
            echo $image_classes;
            ?>
" <?php 
            echo $image_style;
            ?>
>

				<?php 
        }
        ?>

				<?php 
        // Display image
        wpex_post_thumbnail($image_args);
        ?>

				<?php 
        // Close link
        if (isset($a_href) && $a_href) {
            ?>

					</a><!-- .vcex-feature-box-image -->

				<?php 
            // Link not defined, close div
        } else {
            ?>

					</div><!-- .vcex-feature-box-image -->
"<?php 
                        echo $url_target;
                        ?>
>

										<?php 
                    }
                    ?>

									<?php 
                }
                ?>

										<?php 
                // Display featured image
                wpex_post_thumbnail(array('size' => $img_size, 'width' => $img_width, 'height' => $img_height, 'alt' => wpex_get_esc_title(), 'crop' => $img_crop, 'class' => 'vcex-blog-entry-img'));
                ?>

										<?php 
                // Inner link overlay HTML
                wpex_overlay('inside_link', $overlay_style, $atts);
                ?>

									<?php 
                // Close link tag
                if ('nowhere' != $thumb_link) {
                    echo '</a>';
                }
                ?>

									<?php 
예제 #6
0
			<?php 
        }
        ?>

		<?php 
    }
    ?>

			<?php 
    // Primary image
    wpex_post_thumbnail(array('attachment' => $primary_image, 'size' => $img_size, 'crop' => $img_crop, 'width' => $img_width, 'height' => $img_height, 'class' => 'vcex-image-swap-primary', 'style' => $image_style));
    ?>

			<?php 
    // Secondary image
    wpex_post_thumbnail(array('attachment' => $secondary_image, 'size' => $img_size, 'crop' => $img_crop, 'width' => $img_width, 'height' => $img_height, 'class' => 'vcex-image-swap-secondary', 'style' => $image_style));
    ?>

		<?php 
    if ($link) {
        echo '</a>';
    }
    ?>

	</div><!-- .vcex-image-swap -->

	<?php 
    if ($css) {
        echo '</div><!-- .css-wrapper -->';
    }
    ?>
예제 #7
0
			</div><!-- .wpex-slider-slides -->

			<?php 
    if ('true' == $control_thumbs) {
        ?>

				<div class="sp-nc-thumbnails">

					<?php 
        foreach ($posts_cache as $post_id) {
            ?>

						<?php 
            // Output thumbnail image
            wpex_post_thumbnail(array('attachment' => get_post_thumbnail_id($post_id), 'size' => $img_size, 'crop' => $img_crop, 'width' => $img_width, 'height' => $img_height, 'class' => 'sp-nc-thumbnail'));
            ?>

					<?php 
        }
        ?>

				</div><!-- .sp-nc-thumbnailss -->

			<?php 
    }
    ?>

		</div><!-- .wpex-slider -->

	</div><!-- .vcex-testimonials-fullslider -->
예제 #8
0
						<?php 
            } elseif (has_post_thumbnail($post->ID)) {
                ?>

							<div class="vcex-news-entry-thumbnail clr">
								<a href="<?php 
                echo $post->permalink;
                ?>
" title="<?php 
                wpex_esc_title();
                ?>
">
									<?php 
                // Display thumbnail
                wpex_post_thumbnail(array('size' => $img_size, 'crop' => $img_crop, 'width' => $img_width, 'height' => $img_height, 'alt' => wpex_get_esc_title()));
                ?>
								</a>
							</div><!-- .vcex-news-entry-thumbnail -->

						<?php 
            }
            ?>

					<?php 
        }
        ?>

					<?php 
        if ('true' == $title) {
            ?>
예제 #9
0
						</div><!-- .entry -->

					</div><!-- .home-testimonial-entry-content-->

					<div class="testimonial-entry-bottom">

						<?php 
        // Check if post thumbnail is defined
        if (has_post_thumbnail($testimonial->ID) && 'true' == $entry_media) {
            ?>

							<div class="testimonial-entry-thumb">

								<?php 
            // Display post thumbnail
            wpex_post_thumbnail(array('attachment' => get_post_thumbnail_id($testimonial->ID), 'size' => $img_size, 'width' => $img_width, 'height' => $img_height, 'class' => $img_classes, 'style' => $img_style, 'crop' => $img_crop));
            ?>

							</div><!-- /testimonial-thumb -->

						<?php 
        }
        ?>

						<div class="testimonial-entry-meta">

							<?php 
        // Display testimonial author
        if ('true' == $author && $testimonial->author) {
            ?>
예제 #10
0
                    ?>
" title="<?php 
                    echo $post->title_attribute;
                    ?>
" class="<?php 
                    echo $thumbnail_link_classes;
                    ?>
">

							<?php 
                }
                ?>

							<?php 
                // Display post thumbnail
                wpex_post_thumbnail(array('width' => $img_width, 'height' => $img_height, 'size' => $img_size, 'crop' => $img_crop, 'alt' => $post->title_attribute));
                ?>

							<?php 
                // Inner link overlay html
                wpex_overlay('inside_link', $overlay_style, $atts);
                ?>

							<?php 
                if ('none' != $thumbnail_link) {
                    echo '</a>';
                }
                ?>

							<?php 
                // Outer link overlay HTML
예제 #11
0
" title="<?php 
        echo esc_attr($url_title);
        ?>
" class="<?php 
        echo $url_classes;
        ?>
"<?php 
        echo $url_target;
        ?>
>
			<?php 
    }
    ?>
				<?php 
    // Display image
    wpex_post_thumbnail(array('attachment' => $image, 'size' => 'wpex_custom', 'width' => $img_width, 'height' => $img_height));
    ?>
			<?php 
    if ($url) {
        echo '</a>';
    }
    ?>
		</figure>

	<?php 
}
?>

	<?php 
// Content
if ($content || $heading) {
예제 #12
0
    /**
     * Front-end display of widget.
     *
     * @see WP_Widget::widget()
     *
     * @param array $args     Widget arguments.
     * @param array $instance Saved values from database.
     */
    public function widget($args, $instance)
    {
        // Parse instance
        extract(wp_parse_args($instance, $this->defaults));
        // Apply filters to the title
        $title = isset($instance['title']) ? apply_filters('widget_title', $instance['title']) : '';
        // Before widget WP hook
        echo $args['before_widget'];
        // Display title if defined
        if ($title) {
            echo $args['before_title'] . $title . $args['after_title'];
        }
        ?>

		<ul class="wpex-widget-recent-posts wpex-clr style-<?php 
        echo esc_attr($style);
        ?>
">

			<?php 
        // Query args
        $query_args = array('post_type' => $post_type, 'posts_per_page' => $number, 'meta_key' => '_thumbnail_id', 'no_found_rows' => true);
        // Order params - needs FALLBACK don't ever edit!
        if (!empty($orderby)) {
            $query_args['order'] = $order;
            $query_args['orderby'] = $orderby;
        } else {
            $query_args['orderby'] = $order;
            // THIS IS THE FALLBACK
        }
        // Taxonomy args
        if (!empty($taxonomy) && !empty($terms)) {
            // Sanitize terms and convert to array
            $terms = str_replace(', ', ',', $terms);
            $terms = explode(',', $terms);
            // Add to query arg
            $query_args['tax_query'] = array(array('taxonomy' => $taxonomy, 'field' => 'slug', 'terms' => $terms));
        }
        // Exclude current post
        if (is_singular()) {
            $query_args['post__not_in'] = array(get_the_ID());
        }
        // Query posts
        $wpex_query = new WP_Query($query_args);
        // If there are posts loop through them
        if ($wpex_query->have_posts()) {
            // Loop through posts
            while ($wpex_query->have_posts()) {
                $wpex_query->the_post();
                ?>

					<?php 
                // Get hover classes
                if ($img_hover) {
                    $hover_classes = ' ' . wpex_image_hover_classes($img_hover);
                } else {
                    $hover_classes = '';
                }
                ?>

					<li class="wpex-widget-recent-posts-li clr">

						<?php 
                if (has_post_thumbnail()) {
                    ?>
							<a href="<?php 
                    wpex_permalink();
                    ?>
" title="<?php 
                    wpex_esc_title();
                    ?>
" class="wpex-widget-recent-posts-thumbnail<?php 
                    echo esc_attr($hover_classes);
                    ?>
">
								<?php 
                    wpex_post_thumbnail(array('size' => $img_size, 'width' => $img_width, 'height' => $img_height, 'alt' => wpex_get_esc_title()));
                    ?>
							</a>
						<?php 
                }
                ?>

						<a href="<?php 
                wpex_permalink();
                ?>
" title="<?php 
                wpex_esc_title();
                ?>
" class="wpex-widget-recent-posts-title"><?php 
                the_title();
                ?>
</a>

						<?php 
                // Display date if enabled
                if ('1' != $date) {
                    ?>

							<div class="wpex-widget-recent-posts-date">
								<?php 
                    echo get_the_date();
                    ?>
							</div><!-- .wpex-widget-recent-posts-date -->

						<?php 
                }
                ?>

					</li><!-- .wpex-widget-recent-posts-li -->

				<?php 
            }
            ?>

			<?php 
        }
        ?>

		</ul><!-- .wpex-widget-recent-posts -->

		<?php 
        wp_reset_postdata();
        ?>
		
		<?php 
        // After widget WordPress hook
        echo $args['after_widget'];
    }
예제 #13
0
" class="portfolio-entry-media-link"<?php 
                        echo vcex_html('target_attr', $link_target);
                        ?>
>

										<?php 
                    }
                    ?>

									<?php 
                }
                ?>

									<?php 
                // Display post thumbnail
                wpex_post_thumbnail(array('width' => $img_width, 'height' => $img_height, 'crop' => $img_crop, 'alt' => wpex_get_esc_title(), 'class' => 'portfolio-entry-img', 'size' => $img_size));
                ?>

									<?php 
                // Inner link overlay HTML
                wpex_overlay('inside_link', $overlay_style, $atts);
                ?>

									<?php 
                // Close link tag
                if ('nowhere' != $thumb_link) {
                    echo '</a>';
                }
                ?>

									<?php 
						</div><!-- .entry -->

					</div><!-- .home-testimonial-entry-content-->

					<div class="testimonial-entry-bottom">

						<?php 
        // Check if post thumbnail is defined
        if (has_post_thumbnail() && 'true' == $entry_media) {
            ?>

							<div class="testimonial-entry-thumb">

								<?php 
            // Display post thumbnail
            wpex_post_thumbnail(array('size' => $img_size, 'width' => $img_width, 'height' => $img_height, 'class' => $img_classes, 'style' => $img_style, 'crop' => $img_crop));
            ?>

							</div><!-- /testimonial-thumb -->

						<?php 
        }
        ?>

						<div class="testimonial-entry-meta">

							<?php 
        // Display testimonial author
        if ('true' == $author && $testimonial->author) {
            ?>
예제 #15
0
    ?>
			
		</div><!-- .wpex-slider-slides -->

		<div class="wpex-slider-thumbnails sp-thumbnails cols-<?php 
    echo $thumbnails_columns;
    ?>
">

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

				<?php 
        // Output thumbnail image
        wpex_post_thumbnail(array('attachment' => $attachment, 'size' => 'wpex_custom', 'width' => $img_thumb_width, 'height' => $img_thumb_height, 'class' => 'wpex-slider-thumbnail sp-thumbnail'));
        ?>

			<?php 
    }
    ?>

		</div><!-- .wpex-slider-thumbnails -->

	</div><!-- .wpex-slider -->

	<?php 
    // Close css wrapper
    if ($css) {
        echo '</div>';
    }
예제 #16
0
<?php

/**
 * Image Swap style thumbnail
 *
 * @package Total Wordpress Theme
 * @subpackage Templates/WooCommerce
 * @version 3.3.0
 */
// Exit if accessed directly
if (!defined('ABSPATH')) {
    exit;
}
// Return placeholder if there isn't a thumbnail defined.
if (!has_post_thumbnail()) {
    wpex_woo_placeholder_img();
    return;
}
// Get featured image
$attachment = get_post_thumbnail_id();
// Display featured image if defined
if ($attachment) {
    wpex_post_thumbnail(array('attachment' => $attachment, 'size' => 'shop_catalog', 'alt' => wpex_get_esc_title(), 'class' => 'woo-entry-image-main'));
} else {
    echo '<img src="' . wc_placeholder_img_src() . '" alt="' . esc_html__('Placeholder Image', 'total') . '" class="woo-entry-image-main" />';
}
			<?php 
while (have_posts()) {
    the_post();
    ?>

				<?php 
    // Display featured image
    if (has_post_thumbnail()) {
        ?>

					<div id="post-media" class="clr">

						<?php 
        // Dislpay full featured image
        wpex_post_thumbnail(array('size' => 'full', 'alt' => wpex_get_esc_title(), 'schema_markup' => true));
        ?>
						
					</div><!-- #post-media -->

				<?php 
    }
    ?>
				
				<h1 class="single-post-title entry-title"<?php 
    wpex_schema_markup('heading');
    ?>
><?php 
    the_title();
    ?>
</h1><!-- .single-post-title -->
예제 #18
0
        ?>

					<div class="<?php 
        echo $media_classes;
        ?>
">
						<a href="<?php 
        echo get_term_link($term, $taxonomy);
        ?>
" title="<?php 
        echo $term->name;
        ?>
">
							<?php 
        // Display post thumbnail
        wpex_post_thumbnail(array('attachment' => $image_id, 'width' => $img_width, 'height' => $img_height, 'crop' => $img_crop, 'alt' => $term->name, 'size' => $img_size));
        ?>
							<?php 
        // Overlay title
        if ('true' == $title_overlay && 'true' == $title && !empty($term->name)) {
            ?>
								<div class="vcex-terms-grid-entry-overlay wpex-clr">
									<div class="vcex-terms-grid-entry-overlay-table wpex-clr">
										<div class="vcex-terms-grid-entry-overlay-cell wpex-clr">
											<<?php 
            echo $title_tag;
            ?>
 class="vcex-terms-grid-entry-title entry-title"<?php 
            echo $title_style;
            ?>
>
예제 #19
0
global $product;
?>

<li>
	<a href="<?php 
echo esc_url(get_permalink($product->id));
?>
" title="<?php 
echo esc_attr($product->get_title());
?>
">
		<?php 
if (has_post_thumbnail($product->id)) {
    ?>
			<?php 
    wpex_post_thumbnail(array('size' => 'shop_thumbnail'));
    ?>
		<?php 
} else {
    ?>
			<?php 
    echo wc_placeholder_img();
    ?>
		<?php 
}
?>
		<span class="product-title"><?php 
echo $product->get_title();
?>
</span>
	</a>
예제 #20
0
<?php

/**
 * @package WordPress
 * @subpackage WPEX WordPress Framework
 * Standard Post Format
 */
//show featured image if available
if (!of_get_option('single_post_thumb')) {
    wpex_post_thumbnail();
}
					<?php 
    }
    ?>

				</div><!-- .slides -->

				<div class="wpex-slider-thumbnails sp-thumbnails">

					<?php 
    // Add slider thumbnails
    foreach ($attachments as $attachment) {
        ?>

						<?php 
        // Display thumbnail
        wpex_post_thumbnail(array('attachment' => $attachment, 'size' => 'shop_single', 'class' => 'wpex-slider-thumbnail sp-thumbnail'));
        ?>

					<?php 
    }
    ?>

				</div><!-- .wpex-slider-thumbnails -->

			</div><!-- .wpex-slider-slides -->

		</div><!-- .wpex-slider -->

	<?php 
} elseif (has_post_thumbnail()) {
    ?>
예제 #22
0
    /**
     * Front-end display of widget.
     *
     * @see WP_Widget::widget()
     *
     * @param array $args     Widget arguments.
     * @param array $instance Saved values from database.
     */
    public function widget($args, $instance)
    {
        // Parse instance
        extract(wp_parse_args($instance, $this->defaults));
        $img_hover_classes = wpex_image_hover_classes($img_hover);
        // Apply filters to the title
        $title = apply_filters('widget_title', $title, $instance, $this->id_base);
        // Before widget WP hook
        echo $args['before_widget'];
        // Display title if defined
        if ($title) {
            echo $args['before_title'] . $title . $args['after_title'];
        }
        ?>

		<ul class="wpex-recent-posts-thumb-grid wpex-row clr">

			<?php 
        // Query args
        $query_args = array('post_type' => $post_type, 'posts_per_page' => $number, 'meta_key' => '_thumbnail_id', 'no_found_rows' => true);
        // Order params - needs FALLBACK don't ever edit!
        if (!empty($orderby)) {
            $query_args['order'] = $order;
            $query_args['orderby'] = $orderby;
        } else {
            $query_args['orderby'] = $order;
            // THIS IS THE FALLBACK
        }
        // Taxonomy args
        if (!empty($taxonomy) && !empty($terms)) {
            // Sanitize terms and convert to array
            $terms = str_replace(', ', ',', $terms);
            $terms = explode(',', $terms);
            // Add to query arg
            $query_args['tax_query'] = array(array('taxonomy' => $taxonomy, 'field' => 'slug', 'terms' => $terms));
        }
        // Exclude current post
        if (is_singular()) {
            $query_args['post__not_in'] = array(get_the_ID());
        }
        // Query posts
        $wpex_query = new WP_Query($query_args);
        // Set post counter variable
        $count = 0;
        // Loop through posts
        while ($wpex_query->have_posts()) {
            $wpex_query->the_post();
            ?>

				<?php 
            // Add to counter variable
            $count++;
            ?>

				<li class="<?php 
            echo wpex_grid_class($columns);
            ?>
 nr-col col-<?php 
            echo esc_attr($count);
            ?>
">
					<a href="<?php 
            wpex_permalink();
            ?>
" title="<?php 
            wpex_esc_title();
            ?>
"<?php 
            if ($img_hover_classes) {
                echo ' class="' . esc_attr($img_hover_classes) . '"';
            }
            ?>
>
						<?php 
            wpex_post_thumbnail(array('size' => $img_size, 'width' => $img_width, 'height' => $img_height, 'alt' => wpex_get_esc_title()));
            ?>
					</a>
				</li>

				<?php 
            // Reset counter to clear floats
            if ($count == $columns) {
                $count = '0';
            }
            ?>

			<?php 
            // End loop
        }
        ?>

			<?php 
        // Reset global query post data
        wp_reset_postdata();
        ?>

		</ul>

		<?php 
        // After widget WP hook
        echo $args['after_widget'];
        ?>
		
	<?php 
    }
예제 #23
0
		</div><!-- .wpex-slider-slides -->

		<?php 
    if ('true' == $control_thumbs) {
        ?>

			<div class="wpex-slider-thumbnails sp-thumbnails">

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

					<?php 
            // Output thumbnail image
            wpex_post_thumbnail(array('attachment' => $attachment, 'size' => $img_size, 'crop' => $img_crop, 'width' => $img_width, 'height' => $img_height, 'class' => 'wpex-slider-thumbnail sp-thumbnail'));
            ?>

				<?php 
        }
        ?>

			</div><!-- .wpex-slider-thumbnails -->

		<?php 
    }
    ?>

	</div><!-- .wpex-slider -->

	<?php 
예제 #24
0
if (!defined('ABSPATH')) {
    exit;
}
?>

<article class="wpex-clr">

	<?php 
// Check if page should display featured image
if (has_post_thumbnail() && wpex_get_mod('page_featured_image')) {
    ?>

		<div id="page-featured-img" class="clr">
			<?php 
    // Dislpay full featured image
    wpex_post_thumbnail(array('size' => 'full', 'alt' => wpex_get_esc_title()));
    ?>
		</div><!-- #page-featured-img -->

	<?php 
}
?>

	<div class="entry-content entry clr">

		<?php 
// Output page content
the_content();
?>

		<?php 
예제 #25
0
    foreach ($attachment_ids as $attachment_id) {
        ?>

				<?php 
        // Add to counter
        $count++;
        ?>

				<?php 
        // Only display the first 5 images
        if ($count < 5) {
            ?>

					<div class="wpex-slider-slide sp-slide">
						<?php 
            wpex_post_thumbnail(array('attachment' => $attachment_id, 'size' => 'shop_catalog'));
            ?>
					</div><!-- .wpex-slider-slide -->

				<?php 
        }
        ?>

			<?php 
    }
    ?>
		</div><!-- .wpex-slider-slides -->

	</div><!-- .woo-product-entry-slider -->

<?php