• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP wpex_post_thumbnail函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中wpex_post_thumbnail函数的典型用法代码示例。如果您正苦于以下问题:PHP wpex_post_thumbnail函数的具体用法?PHP wpex_post_thumbnail怎么用?PHP wpex_post_thumbnail使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了wpex_post_thumbnail函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: wpex_permalink

/**
 * 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 -->
开发者ID:iq007,项目名称:MadScape,代码行数:30,代码来源:search-entry-thumbnail.php


示例2: wpex_post_thumbnail

        ?>
                     
            
                     
                    <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">
开发者ID:brboise,项目名称:bre,代码行数:31,代码来源:taxonomy-type.php


示例3: subcategory_thumbnail

 /**
  * 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') . '" />';
     }
 }
开发者ID:iq007,项目名称:MadScape,代码行数:16,代码来源:woocommerce-config.php


示例4: wpex_post_thumbnail

					<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 -->
开发者ID:iq007,项目名称:MadScape,代码行数:30,代码来源:vcex_feature_box.php


示例5: wpex_post_thumbnail

"<?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 
开发者ID:VanessaGarcia-Freelance,项目名称:TheEmporiumGroup,代码行数:31,代码来源:vcex_blog_grid.php


示例6: wpex_post_thumbnail

			<?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 -->';
    }
    ?>
开发者ID:iq007,项目名称:MadScape,代码行数:31,代码来源:vcex_image_swap.php


示例7: foreach

			</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 -->
开发者ID:iq007,项目名称:MadScape,代码行数:30,代码来源:vcex_testimonials_slider.php


示例8: elseif

						<?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) {
            ?>
开发者ID:iq007,项目名称:MadScape,代码行数:30,代码来源:vcex_recent_news.php


示例9: wpex_post_thumbnail

						</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) {
            ?>
开发者ID:iq007,项目名称:MadScape,代码行数:30,代码来源:vcex_testimonials_grid.php


示例10: wpex_post_thumbnail

                    ?>
" 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
开发者ID:iq007,项目名称:MadScape,代码行数:31,代码来源:vcex_blog_carousel.php


示例11: esc_attr

" 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) {
开发者ID:iq007,项目名称:MadScape,代码行数:31,代码来源:vcex_teaser.php


示例12: widget

    /**
     * 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();
                ?>
//.........这里部分代码省略.........
开发者ID:iq007,项目名称:MadScape,代码行数:101,代码来源:posts-thumbnails.php


示例13: vcex_html

" 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 
开发者ID:iq007,项目名称:MadScape,代码行数:31,代码来源:vcex_portfolio_grid.php


示例14: wpex_post_thumbnail

						</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) {
            ?>
开发者ID:VanessaGarcia-Freelance,项目名称:TheEmporiumGroup,代码行数:30,代码来源:vcex_testimonials_grid.php


示例15: foreach

    ?>
			
		</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>';
    }
开发者ID:iq007,项目名称:MadScape,代码行数:31,代码来源:vcex_image_galleryslider.php


示例16: wpex_woo_placeholder_img

<?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" />';
}
开发者ID:iq007,项目名称:MadScape,代码行数:26,代码来源:featured-image.php


示例17: while

			<?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 -->
开发者ID:VanessaGarcia-Freelance,项目名称:TheEmporiumGroup,代码行数:30,代码来源:single-other.php


示例18: get_term_link

        ?>

					<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;
            ?>
>
开发者ID:iq007,项目名称:MadScape,代码行数:31,代码来源:vcex_terms_grid.php


示例19: esc_url

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>
开发者ID:iq007,项目名称:MadScape,代码行数:31,代码来源:content-widget-product.php


示例20: wpex_post_thumbnail

<?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();
}
开发者ID:peternem,项目名称:vlt-wp,代码行数:11,代码来源:single-standard.php



注:本文中的wpex_post_thumbnail函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP wpex_sanitize_data函数代码示例发布时间:2022-05-23
下一篇:
PHP wpex_pagination函数代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap