예제 #1
0
/**
 * Returns correct thumbnail HTML for the portfolio posts
 *
 * @since 2.0.0
 */
function wpex_get_portfolio_post_thumbnail($args = array())
{
    // Define thumbnail args
    $defaults = array('size' => 'portfolio_post', 'class' => 'portfolio-single-media-img', 'alt' => wpex_get_esc_title(), 'schema_markup' => true);
    // Parse arguments
    $args = wp_parse_args($args, $defaults);
    // Return thumbanil
    return wpex_get_post_thumbnail(apply_filters('wpex_get_portfolio_post_thumbnail_args', $args));
}
예제 #2
0
    // Declare counter var
    $count = 0;
    // Loop through posts
    while ($wpex_query->have_posts()) {
        // Add to counter
        $count++;
        // Get post from query
        $wpex_query->the_post();
        // Get post data
        $get_post = get_post();
        // Post Data
        $post_id = $get_post->ID;
        $post_content = $get_post->post_content;
        $post_title = $get_post->post_title;
        $post_type = $get_post->post_type;
        $post_title_esc = wpex_get_esc_title();
        $post_permalink = wpex_get_permalink($post_id);
        $post_format = get_post_format($post_id);
        $post_thumbnail = wp_get_attachment_url(get_post_thumbnail_id());
        ?>

			<div class="vcex-post-type-list-entry vcex-clr vcex-count-<?php 
        echo $count;
        ?>
">

				<?php 
        // Featured post
        if ('true' == $featured_post && '1' == $count) {
            // Featured post => image
            if ($post_thumbnail) {
    /**
     * Front-end display of widget.
     *
     * @see WP_Widget::widget()
     *
     * @param array $args     Widget arguments.
     * @param array $instance Saved values from database.
     */
    function widget($args, $instance)
    {
        // Set vars for widget usage
        $title = isset($instance['title']) ? $instance['title'] : '';
        $title = apply_filters('widget_title', $title);
        $post_type = isset($instance['post_type']) ? $instance['post_type'] : '';
        $taxonomy = isset($instance['taxonomy']) ? $instance['taxonomy'] : '';
        $terms = isset($instance['terms']) ? $instance['terms'] : '';
        $number = isset($instance['number']) ? $instance['number'] : '';
        $order = isset($instance['order']) ? $instance['order'] : '';
        $columns = isset($instance['columns']) ? $instance['columns'] : '3';
        $img_hover = isset($instance['img_hover']) ? $instance['img_hover'] : '';
        $img_size = isset($instance['img_size']) ? $instance['img_size'] : 'wpex_custom';
        $img_height = !empty($instance['img_height']) ? intval($instance['img_height']) : '';
        $img_width = !empty($instance['img_width']) ? intval($instance['img_width']) : '';
        $img_size = $img_width || $img_height ? 'wpex_custom' : $img_size;
        $exclude = is_singular() ? array(get_the_ID()) : NULL;
        // Sanitize terms
        if ($terms) {
            $terms = str_replace(', ', ',', $terms);
            $terms = explode(',', $terms);
        }
        // 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, 'orderby' => $order, 'meta_key' => '_thumbnail_id', 'post__not_in' => $exclude, 'no_found_rows' => true);
        // Taxonomy args
        if (!empty($taxonomy) && !empty($terms)) {
            $query_args['tax_query'] = array(array('taxonomy' => $taxonomy, 'field' => 'slug', 'terms' => $terms));
        }
        // Query posts
        $my_query = new WP_Query($query_args);
        ?>
			
			<?php 
        // Set post counter variable
        $count = 0;
        ?>

			<?php 
        // Loop through posts
        while ($my_query->have_posts()) {
            $my_query->the_post();
            ?>

				<?php 
            // Add to counter variable
            $count++;
            ?>
				
				<?php 
            // Get post thumbnail
            $thumbnail = wpex_get_post_thumbnail(array('size' => $img_size, 'width' => $img_width, 'height' => $img_height, 'alt' => wpex_get_esc_title()));
            ?>

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

				<li class="<?php 
            echo wpex_grid_class($columns);
            ?>
 nr-col col-<?php 
            echo $count;
            ?>
">
					<a href="<?php 
            wpex_permalink();
            ?>
" title="<?php 
            wpex_esc_title();
            ?>
"<?php 
            echo $hover_classes;
            ?>
><?php 
            echo $thumbnail;
            ?>
</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 
    }
예제 #4
0
파일: slider.php 프로젝트: PlanoBWeb/BDA
										<div class="homepage-slide-caption"><?php 
                echo $caption;
                ?>
</div>
									<?php 
            }
            ?>
								</div><!-- .homepage-slider-content -->
							</div>
						<?php 
        }
        ?>

						<?php 
        // Display post thumbnail
        the_post_thumbnail('wpex-home-slider', array('alt' => wpex_get_esc_title()));
        ?>

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

					</li>

				<?php 
    }
    ?>

			</ul><!-- .slides -->
예제 #5
0
<?php

/**
 * Single Custom Post Type Media
 *
 * @package Total WordPress theme
 * @subpackage Partials
 * @version 3.3.0
 */
// Exit if accessed directly
if (!defined('ABSPATH')) {
    exit;
}
// Thumbnail args
$args = apply_filters('wpex_' . get_post_type() . '_single_thumbnail_args', array('size' => 'full', 'alt' => wpex_get_esc_title(), 'schema_markup' => true));
// Get thumbnail
$thumbnail = wpex_get_post_thumbnail($args);
// Display featured image
if ($thumbnail) {
    ?>

	<div id="post-media" class="wpex-clr">
		<?php 
    echo $thumbnail;
    ?>
	</div><!-- #post-media -->

<?php 
}
예제 #6
0
				<div class="wpex-carousel-slide wpex-clr<?php 
            if ($entry_css) {
                echo ' ' . $entry_css;
            }
            ?>
">

					<?php 
            // Display media
            if ('true' == $media && has_post_thumbnail()) {
                ?>
						
						<?php 
                // Image html
                $img_html = wpex_get_post_thumbnail(array('size' => $img_size, 'crop' => $img_crop, 'width' => $img_width, 'height' => $img_height, 'alt' => wpex_get_esc_title()));
                ?>

						<div class="<?php 
                echo $media_classes;
                ?>
">

							<?php 
                // No links
                if ('none' == $thumbnail_link) {
                    ?>

								<?php 
                    echo $img_html;
                    ?>
예제 #7
0
파일: helpers.php 프로젝트: PlanoBWeb/BDA
/**
 * Outputs escaped post title
 *
 * @since 2.0.0
 */
function wpex_esc_title()
{
    echo wpex_get_esc_title();
}
예제 #8
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'];
    }
예제 #9
0
파일: entry.php 프로젝트: PlanoBWeb/BDA
<article id="post-<?php 
the_ID();
?>
" <?php 
post_class();
?>
>

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

		<div class="staff-entry-media clr">
			<?php 
    // Display post thumbnail
    the_post_thumbnail('wpex-staff-entry', array('alt' => wpex_get_esc_title(), 'class' => 'staff-entry-img'));
    ?>
		</div><!-- .staff-entry-media -->

	<?php 
}
?>

	<header class="staff-entry-header">
		<h2 class="staff-entry-title"><?php 
the_title();
?>
</h2>
	</header><!-- .staff-entry-header -->

	<div class="staff-entry-content clr entry">
예제 #10
0
                    echo $post->title;
                    ?>

										<?php 
                    // Link title to lightbox
                } elseif ('lightbox' == $title_link) {
                    ?>

											<?php 
                    $atts['lightbox_data'] = array();
                    // Lightbox data
                    if ($lightbox_skin && 'true' !== $thumb_lightbox_gallery) {
                        $atts['lightbox_data'][] = 'data-skin="' . $lightbox_skin . '"';
                    }
                    if ('true' == $thumb_lightbox_title) {
                        $atts['lightbox_data'][] = 'data-title="' . wpex_get_esc_title() . '"';
                    }
                    // Display lightbox
                    if ('true' == $thumb_lightbox_caption && $post->excerpt) {
                        $atts['lightbox_data'][] = 'data-caption="' . str_replace('"', "'", $post->excerpt) . '"';
                    }
                    $lightbox_data = ' ' . implode(' ', $atts['lightbox_data']);
                    ?>

											<a href="<?php 
                    wpex_lightbox_image();
                    ?>
" title="<?php 
                    wpex_esc_title();
                    ?>
" class="wpex-lightbox"<?php 
예제 #11
0
if (!wpex_global_obj('has_social_share') || post_password_required()) {
    return;
}
// Get sharing sites
$sites = wpex_social_share_sites();
// Return if there aren't any sites enabled
if (empty($sites)) {
    return;
}
// Declare main vars
$position = wpex_social_share_position();
$style = wpex_social_share_style();
$heading = wpex_social_share_heading();
$post_id = wpex_global_obj('post_id');
$url = apply_filters('wpex_social_share_url', get_permalink($post_id));
$title = html_entity_decode(wpex_get_esc_title());
// Get and encode summary
$summary = wpex_get_excerpt(array('length' => '40', 'echo' => false, 'ignore_more_tag' => true));
?>

<div class="wpex-social-share-wrap clr position-<?php 
echo esc_attr($position);
if ('full-screen' == wpex_global_obj('post_layout')) {
    echo ' container';
}
?>
">

	<?php 
// Display heading if enabled
if (wpex_get_mod('social_share_heading_enable', true) && 'horizontal' == $position) {
 /**
  * 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' => wpex_get_esc_title()));
     } else {
         echo '<img src="' . wc_placeholder_img_src() . '" alt="' . __('Placeholder Image', 'wpex') . '" />';
     }
 }
    /**
     * Front-end display of widget.
     *
     * @see WP_Widget::widget()
     *
     * @param array $args     Widget arguments.
     * @param array $instance Saved values from database.
     */
    function widget($args, $instance)
    {
        // Set vars
        $title = isset($instance['title']) ? apply_filters('widget_title', $instance['title']) : __('Recent Posts', 'wpex');
        $number = isset($instance['number']) ? $instance['number'] : '3';
        $style = isset($instance['style']) ? $instance['style'] : 'default';
        $order = isset($instance['order']) ? $instance['order'] : '';
        $date = isset($instance['date']) ? $instance['date'] : '';
        $post_type = isset($instance['post_type']) ? $instance['post_type'] : '';
        $taxonomy = isset($instance['taxonomy']) ? $instance['taxonomy'] : '';
        $terms = isset($instance['terms']) ? $instance['terms'] : '';
        $img_hover = isset($instance['img_hover']) ? $instance['img_hover'] : '';
        $img_size = isset($instance['img_size']) ? $instance['img_size'] : 'wpex_custom';
        $img_height = !empty($instance['img_height']) ? intval($instance['img_height']) : '';
        $img_width = !empty($instance['img_width']) ? intval($instance['img_width']) : '';
        $img_size = $img_width || $img_height ? 'wpex_custom' : $img_size;
        $exclude = is_singular() ? array(get_the_ID()) : NULL;
        // Sanitize terms
        if ($terms) {
            $terms = str_replace(', ', ',', $terms);
            $terms = explode(',', $terms);
        }
        // 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 clr style-<?php 
        echo $style;
        ?>
">

			<?php 
        // Query args
        $query_args = array('post_type' => $post_type, 'posts_per_page' => $number, 'orderby' => $order, 'post__not_in' => $exclude, 'meta_key' => '_thumbnail_id', 'no_found_rows' => true);
        // Taxonomy args
        if (!empty($taxonomy) && !empty($terms)) {
            $query_args['tax_query'] = array(array('taxonomy' => $taxonomy, 'field' => 'slug', 'terms' => $terms));
        }
        // Query posts
        $my_query = new WP_Query($query_args);
        // If there are posts loop through them
        if ($my_query->have_posts()) {
            // Loop through posts
            while ($my_query->have_posts()) {
                $my_query->the_post();
                ?>
				
					<?php 
                // Get post thumbnail
                $thumbnail = wpex_get_post_thumbnail(array('size' => $img_size, 'width' => $img_width, 'height' => $img_height, 'alt' => wpex_get_esc_title()));
                ?>

					<?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 ($thumbnail) {
                    ?>
							<a href="<?php 
                    wpex_permalink();
                    ?>
" title="<?php 
                    wpex_esc_title();
                    ?>
" class="wpex-widget-recent-posts-thumbnail<?php 
                    echo $hover_classes;
                    ?>
"><?php 
                    echo $thumbnail;
                    ?>
</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'];
    }
예제 #14
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 -->
예제 #15
0
/**
 * Returns correct thumbnail HTML for the testimonials entries
 *
 * @since 2.0.0
 */
function wpex_get_testimonials_entry_thumbnail()
{
    return wpex_get_post_thumbnail(array('size' => 'testimonials_entry', 'class' => 'testimonials-entry-img', 'alt' => wpex_get_esc_title()));
}
예제 #16
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">
예제 #17
0
				</div><!-- .wpex-slider-thumbnails -->

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

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

	<?php 
} elseif (has_post_thumbnail() || isset($attachments[0])) {
    ?>

		<?php 
    // Get image data
    $image_id = isset($attachments[0]) ? $attachments[0] : $attachment_id;
    $image_title = esc_attr(get_the_title($image_id));
    $image_link = wp_get_attachment_url($image_id);
    $image = wpex_get_post_thumbnail(array('attachment' => $image_id, 'size' => 'shop_single', 'title' => wpex_get_esc_title()));
    if ($product->has_child()) {
        echo apply_filters('woocommerce_single_product_image_html', sprintf('<div class="woocommerce-main-image">%s</div>', $image), $post->ID);
    } else {
        echo apply_filters('woocommerce_single_product_image_html', sprintf('<a href="%s" itemprop="image" class="woocommerce-main-image wpex-lightbox" title="%s" >%s</a>', $image_link, $image_title, $image), $post->ID);
    }
    // Display variation thumbnails
    if ($product->has_child() || !$show_slider) {
        ?>

			<div class="product-variation-thumbs clr lightbox-group">

				<?php 
        foreach ($attachments as $attachment) {
            ?>
					
예제 #18
0
/**
 * Returns correct thumbnail HTML for the staff posts
 *
 * @since 2.0.0
 */
function wpex_get_staff_post_thumbnail()
{
    return wpex_get_post_thumbnail(apply_filters('wpex_get_staff_post_thumbnail_args', array('size' => 'staff_post', 'class' => 'staff-single-media-img', 'alt' => wpex_get_esc_title(), 'schema_markup' => true)));
}
예제 #19
0
파일: entry.php 프로젝트: PlanoBWeb/BDA
	<?php 
// Display post thumbnail
if (has_post_thumbnail()) {
    ?>

		<div class="search-entry-thumbnail">
			<a href="<?php 
    the_permalink();
    ?>
" title="<?php 
    echo esc_attr(the_title_attribute('echo=0'));
    ?>
">
				<?php 
    // Display post thumbnail
    the_post_thumbnail('thumbnail', array('alt' => wpex_get_esc_title()));
    ?>
			</a>
		</div><!-- .post-entry-thumbnail -->

	<?php 
}
?>

	<div class="search-entry-text clr">

		<header>
			<h2 class="search-entry-title"><a href="<?php 
the_permalink();
?>
" title="<?php 
예제 #20
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" />';
}
/**
 * Returns the blog post thumbnail
 *
 * @since 1.0.0
 */
function wpex_get_blog_post_thumbnail($args = '')
{
    // If args isn't array then it's the attachment
    if (!is_array($args) && !empty($args)) {
        $args = array('attachment' => $args, 'alt' => wpex_get_esc_title(), 'width' => '', 'height' => '', 'class' => '', 'schema_markup' => false);
    }
    // Defaults
    $defaults = array('size' => 'blog_post', 'schema_markup' => true);
    // Parse arguments
    $args = wp_parse_args($args, $defaults);
    // Apply filter to args
    $args = apply_filters('wpex_blog_entry_thumbnail_args', $args);
    // Generate thumbnail
    $thumbnail = wpex_get_post_thumbnail($args);
    // Apply filters for child theming
    return apply_filters('wpex_blog_post_thumbnail', $thumbnail);
}
예제 #22
0
파일: blog.php 프로젝트: PlanoBWeb/BDA
">

					<?php 
        // Display post thumbnail
        if (has_post_thumbnail()) {
            ?>
						<div class="recent-blog-entry-thumbnail">
							<a href="<?php 
            the_permalink();
            ?>
" title="<?php 
            echo esc_attr(the_title_attribute('echo=0'));
            ?>
">
								<?php 
            the_post_thumbnail('wpex-entry', array('alt' => wpex_get_esc_title()));
            ?>
							</a>
						</div><!-- .recent-blog-entry-thumbnail -->
					<?php 
        }
        ?>

					<header>
						<h3 class="recent-blog-entry-title"><a href="<?php 
        the_permalink();
        ?>
" title="<?php 
        echo esc_attr(the_title_attribute('echo=0'));
        ?>
"><?php 
예제 #23
0
            ?>

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

							<div class="vcex-testimonials-fullslider-inner textcenter clr">

								<?php 
            // Author avatar
            if ('yes' == $display_author_avatar && has_post_thumbnail($testimonial->ID)) {
                ?>

									<div class="vcex-testimonials-fullslider-avatar">

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

									</div><!-- .vcex-testimonials-fullslider-avatar -->

								<?php 
            }
            ?>

								<?php 
            // Custom Excerpt
            if ('true' == $excerpt) {
                if ('true' == $read_more) {
                    $read_more_text = $read_more_text ? $read_more_text : esc_html__('read more', 'total');
                    $read_more_link = '&hellip;<a href="' . get_permalink() . '" title="' . $read_more_text . '">' . $read_more_text . '<span>&rarr;</span></a>';
                } else {
"<?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 
			<?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 -->
예제 #26
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 
    }
    ?>

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

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

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

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

		<?php 
    $image_title = esc_attr(get_the_title(get_post_thumbnail_id()));
    $image_link = wp_get_attachment_url(get_post_thumbnail_id());
    $image = wpex_get_post_thumbnail(array('size' => 'shop_single', 'title' => wpex_get_esc_title()));
    if ($product->has_child()) {
        echo apply_filters('woocommerce_single_product_image_html', sprintf('<div class="woocommerce-main-image">%s</div>', $image), $post->ID);
    } else {
        echo apply_filters('woocommerce_single_product_image_html', sprintf('<a href="%s" itemprop="image" class="woocommerce-main-image wpex-lightbox" title="%s" >%s</a>', $image_link, $image_title, $image), $post->ID);
    }
    // Display variation thumbnails
    if ($product->has_child()) {
        ?>

			<div class="product-variation-thumbs clr lightbox-group">

				<?php 
        foreach ($attachments as $attachment) {
            ?>
					
예제 #28
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 
예제 #29
0
파일: entry.php 프로젝트: PlanoBWeb/BDA
	<?php 
if (has_post_thumbnail()) {
    ?>

		<div class="portfolio-entry-media">

				<a href="<?php 
    the_permalink();
    ?>
" title="<?php 
    echo esc_attr(the_title_attribute('echo=0'));
    ?>
" rel="bookmark">
					<?php 
    // Display post thumbnail
    the_post_thumbnail('wpex-portfolio-entry', array('alt' => wpex_get_esc_title(), 'class' => 'portfolio-entry-img'));
    ?>
				</a>

		</div><!-- .portfolio-entry-media -->

	<?php 
}
?>

	<div class="portfolio-entry-details clr">

		<h3 class="portfolio-entry-title">
			<a href="<?php 
the_permalink();
?>