コード例 #1
0
 /**
  * Use Multi Post Thumbnails to output the HTML necessary for displaying a custom
  * post thumbnail.
  *
  * @param string $type The type of post thumbnail to display.
  * @param string $size The size of the post thumbnail.
  */
 public function the_post_thumbnail($type, $size)
 {
     if (class_exists('MultiPostThumbnails')) {
         MultiPostThumbnails::the_post_thumbnail(get_post_type(), $type, get_the_ID(), $size);
     } else {
         echo '';
     }
 }
コード例 #2
0
ファイル: home.php プロジェクト: rdeco/scattered_dreams
</h1>
			</div>		

			<div class="col-xs-12 grid">
				<div class="row">
					<?php 
if (have_posts()) {
    while (have_posts()) {
        the_post();
        ?>
						
					<div class="col-xs-12 col-sm-4 ">
						<figure class="effect-romeo">
							<?php 
        if (class_exists('MultiPostThumbnails')) {
            MultiPostThumbnails::the_post_thumbnail(get_post_type(), 'portfolio-archive-image');
        }
        ?>
	
							<figcaption>
								<h2>   
									<?php 
        $words = explode(' ', the_title('', '', false));
        $words[1] = '<span>' . $words[1] . '</span>';
        $title = implode(' ', $words);
        echo $title;
        ?>
                                </h2>								
								<p><?php 
        echo excerpt(30);
        ?>
コード例 #3
0
ファイル: front-page.php プロジェクト: rdeco/scattered_dreams
?>
	
			            		<figcaption>
									<?php 
if (dynamic_sidebar('featured-center')) {
}
?>
							
								</figcaption>	
							</figure>													
						</article>	
						<article class="featured-content col-xs-12 col-md-4 col-lg-3 first">							
							<figure class="featured-img">
								<?php 
if (class_exists('MultiPostThumbnails')) {
    MultiPostThumbnails::the_post_thumbnail(get_post_type(), 'third-featured-image');
}
?>
	
			            		<figcaption>
									<?php 
if (dynamic_sidebar('featured-right')) {
}
?>
									
								</figcaption>	
							</figure>													
						</article>																	
					</div>												
				</div> <!-- .index-content .col-xs-12 -->
				<?php 
コード例 #4
0
ファイル: index.php プロジェクト: rajadileepkumar/travels
					<?php 
if (have_posts()) {
    while (have_posts()) {
        the_post();
    }
    the_content();
}
?>
				</p>
			</div>
		</div>
		<div class="col-md-3">
			<?php 
add_image_size('custom-size', 263, 263);
if (class_exists('MultiPostThumbnails')) {
    MultiPostThumbnails::the_post_thumbnail(get_post_type(), 'feature-image-2', NULL, 'custom-size');
}
?>
		</div>
	</div>
</section>
<section class="why">
	<div class="container">
		<div class="row" style="border-bottom:1px dotted #ccc">
			<?php 
$paged = get_query_var('paged') ? get_query_var('paged') : 1;
$wp_query = new WP_Query(array('post_type' => 'post', 'showposts' => '8', 'paged' => $paged, 'order' => 'ASC'));
if ($wp_query->have_posts()) {
    while ($wp_query->have_posts()) {
        $wp_query->the_post();
        ?>
コード例 #5
0
ファイル: single.php プロジェクト: eursula/portfolio
 </div>
 <div class="container">
     <div class="row">
         <div class="main-container flex flex-column flex-j-center">
             <div class="single-image flex flex-j-center">
                 <?php 
 if (class_exists('MultiPostThumbnails')) {
     MultiPostThumbnails::the_post_thumbnail(get_post_type(), 'feature-image-3');
 }
 ?>
             </div>
             <div class="main-container flex flex-j-center">
                 <div class="single-image flex flex-j-center">
                     <?php 
 if (class_exists('MultiPostThumbnails')) {
     MultiPostThumbnails::the_post_thumbnail(get_post_type(), 'feature-image-4');
 }
 ?>
                 </div>
             </div>
         </div>
     </div>
     <div class="page-links flex flex-j-between flex-j-end">
         <div class="previous">
             <?php 
 previous_post_link();
 ?>
         </div>
         <div class="next">
             <?php 
 next_post_link();
コード例 #6
0
        ?>
 <i class="fa fa-comments fa-fw"></i><?php 
        $comments_count = wp_count_comments();
        echo $comments_count->total_comments . '&nbsp;Comments';
        ?>
												</p>
											 </header>

											<div class="content_single">
												

												<div class="post_thumbnails">
															 
												<?php 
        if (class_exists('MultiPostThumbnails')) {
            MultiPostThumbnails::the_post_thumbnail(get_post_type(), 'secondary-image', NULL, 'post-secondary-image-thumbnail');
        }
        ?>
			 									
			 									</div>	
			 									<div class="sidebar-wrapper right">
		
													<div class="post-details">
																<h4 style="padding:0px;margin:20px 0">Post Details</h4>
																<?php 
        $postid = get_the_ID();
        $level = get_post_meta($postid, 'level', 1);
        $length = get_post_meta($postid, 'length', 1);
        $demo = get_post_meta($postid, 'demo', 1);
        $designation = get_post_meta($postid, 'designation', 1);
        $r1 = get_post_meta($postid, 'r1', 1);
コード例 #7
0
ファイル: index.php プロジェクト: agiledevcl/agile-bootcamp
					</div>
				</div>
			<?php 
}
?>

			<?php 
if (!empty($productos[2])) {
    ?>
				<div data-sr="enter top, over 1s" class="col-xs-12 col-sm-4 text-center">
					<div class="producto-index">
						<div class="producto-images-box">
							<?php 
    if (class_exists('MultiPostThumbnails')) {
        MultiPostThumbnails::the_post_thumbnail(get_post_type(), 'image-1', $post_id = $productos[2], 'part3-1');
        MultiPostThumbnails::the_post_thumbnail(get_post_type(), 'image-2', $post_id = $productos[2], 'part3-2');
    }
    ?>
							<a class="btn btn-warning btn-md text-uppercase" role="button"><?php 
    echo get_the_title($productos[2]);
    ?>
</a>
						</div>
					</div>
				</div>
			<?php 
}
?>

			
		</div>
コード例 #8
0
						<?php 
        $large_image_url = wp_get_attachment_image_src(get_post_thumbnail_id(), 'large');
        echo '<a href="' . $large_image_url[0] . '" title="' . the_title_attribute('echo=0') . '" alt="" class="tx-colorbox">';
        the_post_thumbnail('imax-single-thumb');
        echo '</a>';
        if (class_exists('MultiPostThumbnails')) {
            $large_image_url1 = wp_get_attachment_image_src(MultiPostThumbnails::get_post_thumbnail_id(get_post_type(), 'feature-image-2', $post->ID), 'large');
            if ($large_image_url1) {
                echo '<a href="' . $large_image_url1[0] . '" title="' . the_title_attribute('echo=0') . '" class="tx-colorbox">';
                MultiPostThumbnails::the_post_thumbnail(get_post_type(), 'feature-image-2', NULL, 'imax-single-thumb');
                echo '</a>';
            }
            $large_image_url2 = wp_get_attachment_image_src(MultiPostThumbnails::get_post_thumbnail_id(get_post_type(), 'feature-image-3', $post->ID), 'large');
            if ($large_image_url2) {
                echo '<a href="' . $large_image_url2[0] . '" title="' . the_title_attribute('echo=0') . '" class="tx-colorbox">';
                MultiPostThumbnails::the_post_thumbnail(get_post_type(), 'feature-image-3', NULL, 'imax-single-thumb');
                echo '</a>';
            }
        }
        ?>
						</div>
						
					</header><!-- .entry-header -->
                    <?php 
    }
    ?>
                    
                    <div class="folio-meta">
                    <?php 
    if (!empty($sub_title)) {
        ?>
コード例 #9
0
			<strong class="item-price"><span><?php 
printf(__('Item Price: %s', 'marketify'), edd_price(get_the_ID(), false));
?>
</span></strong>

			<?php 
do_action('marketify_download_content_image_overlay_after');
?>
		</div>
	</div>

	<?php 
if (class_exists('MultiPostThumbnails') && MultiPostThumbnails::get_the_post_thumbnail('download', 'grid-image')) {
    ?>
		<?php 
    MultiPostThumbnails::the_post_thumbnail('download', 'grid-image', null, 'content-grid-download');
    ?>
	<?php 
} elseif (has_post_thumbnail()) {
    ?>
		<?php 
    the_post_thumbnail('content-grid-download');
    ?>
	<?php 
} else {
    ?>
		<span class="image-placeholder"></span>
	<?php 
}
?>
</div>
コード例 #10
0
								alt= "<?php 
            bloginfo('name');
            ?>
" 					
								data-title="<?php 
            echo esc_html($title);
            ?>
" 
                                data-description="<?php 
            echo esc_html($caption);
            ?>
">
	                                
									<img class="portfolio-image"  src="<?php 
            if (class_exists('MultiPostThumbnails')) {
                MultiPostThumbnails::the_post_thumbnail(get_post_type(), $name);
            }
            ?>
">
							</a>
						</li>
						<?php 
        }
        ?>
	
					</ul><!-- og-grid -->
					
									</div>	<!-- col-xs-12 -->
			</div> <!-- row -->
									    				    
		
コード例 #11
0
ファイル: front-page.php プロジェクト: srinivas-qfor/jkc-wp
            echo "first-col";
        }
        ?>
">
                                <div class="row">
                                    <div class="img-wrap">
                                        <a href="<?php 
        the_permalink();
        ?>
" title="<?php 
        the_title();
        ?>
">
                                            <?php 
        if (class_exists('MultiPostThumbnails') && MultiPostThumbnails::has_post_thumbnail('post', 'home-image')) {
            MultiPostThumbnails::the_post_thumbnail('post', 'home-image', NULL, 'full', NULL, false);
        } else {
            ?>
                                                <img src="<?php 
            bloginfo('template_directory');
            ?>
/assets/img/jkc-no-image-288x140.jpg" alt="<?php 
            the_title();
            ?>
" draggable="false">
                                            <?php 
        }
        ?>
                                        </a>
                                    </div>
                                    <div class="category">
コード例 #12
0
ファイル: cwp_theme.php プロジェクト: repo-storage/core-wp
 /**
  *
  * @param type $id
  * @param type $size
  * @return type
  */
 public static function theme_offline_image($id = null, $size = 'offline-large')
 {
     if (!isset($id)) {
         $id = self::default_id();
     }
     if (MultiPostThumbnails::has_post_thumbnail('cwp_custom_options', $id)) {
         return MultiPostThumbnails::the_post_thumbnail('cwp_custom_options', 'offline-image', $id, $size);
     } else {
         return false;
     }
 }
コード例 #13
0
ファイル: functions.php プロジェクト: srinivas-qfor/jkc-wp
function render_flipper($atts)
{
    extract(shortcode_atts(array('name' => null), $atts));
    $featuredCategory = get_category($atts['cat']);
    $featuredCategoryParent = $featuredCategory->category_parent;
    $flipperCategory = !empty($featuredCategoryParent) ? $featuredCategoryParent : $atts['cat'];
    if ($atts['name'] == "home-flipper") {
        wp_enqueue_style('mod-flipper');
        $args = array('posts_per_page' => 10, 'meta_key' => '_featured-post' . (is_home() ? '-home' : '') . '-order', 'cat' => !empty($flipperCategory) ? $flipperCategory : 0, 'order' => 'ASC', 'orderby' => 'meta_value_num', 'meta_query' => array(array('key' => '_featured-post' . (is_home() ? '-home' : ''), 'value' => 1)));
        $featured = new WP_Query($args);
        if ($featured->have_posts()) {
            ?>
 
        <div class="feature-left-wrap left col-17">    
		    <div class="mod-flipper">
                <div class="flex-container">
                    <div class="flexslider <?php 
            echo $featured->post_count > 1 ? 'hasSlider' : 'noSlider';
            ?>
" id="flexslider">

                        <ul class="slides">
                            <?php 
            while ($featured->have_posts()) {
                $featured->the_post();
                ?>
                            <li class="slide">
                                <div class="img-wrap" data-title="<?php 
                echo the_title();
                ?>
" data-smalltitle="<?php 
                echo substr(the_title(), 0, 35);
                ?>
" data-text="<?php 
                echo get_the_excerpt();
                ?>
" data-href="<?php 
                echo the_permalink();
                ?>
">
                                    <a href="<?php 
                echo the_permalink();
                ?>
" title="<?php 
                echo the_title();
                ?>
">
                                        <?php 
                if (has_post_thumbnail()) {
                    $image = wp_get_attachment_image_src(get_post_thumbnail_id(get_the_ID()), 'thumbnail');
                    $featured_alt = get_post_meta(get_post_thumbnail_id($post->ID), '_wp_attachment_image_alt', true) ?: get_the_title();
                    $image = $image[0];
                    ?>
                                             <!--<img src="<?php 
                    echo $image;
                    ?>
" alt="<?php 
                    the_title();
                    ?>
" draggable="false">-->
                                        <?php 
                    if (class_exists('MultiPostThumbnails')) {
                        MultiPostThumbnails::the_post_thumbnail('post', 'flipper-image', NULL, 'large', NULL, false);
                    }
                    ?>
                                        
                                        <?php 
                } else {
                    ?>
                                            <img src="<?php 
                    bloginfo('template_directory');
                    ?>
/assets/img/jkc-no-image-650x317.jpg" alt="'.the_title().'" draggable="false">';
                                        <?php 
                }
                ?>
                                        <!--img onerror="this.src='/img/jkc-no-image-650x317.jpg'" src="http://image.jeanknowscars.com/f/95937843+w650+h317+re0+cr1+ar0/volvo-s90-promolarge.jpg" alt="<?php 
                echo the_title();
                ?>
" draggable="false"-->
                                    </a>
                                </div>
                            </li>
                        <?php 
            }
            ?>
                        </ul>
                    </div>
                    <?php 
            $c = 0;
            while ($featured->have_posts()) {
                $featured->the_post();
                if ($c == 0) {
                    ?>
                    <div class="flipper-info-box">
                        <a class="flipper-info-title" href="<?php 
                    echo the_permalink();
                    ?>
" title="<?php 
                    echo the_title();
                    ?>
" style="display: inline-block;"><?php 
                    echo the_title();
                    ?>
</a>
                        <span class="flipper-info-text" data-simflink="{&quot;url&quot;: &quot;<?php 
                    echo the_permalink();
                    ?>
&quot;}" style="display: block;"><?php 
                    echo the_excerpt();
                    ?>
</span>
                        <?php 
                    if ($featured->post_count > 1) {
                        ?>
                        <div class="flipper-info-pager" style="display: block;">
                            <span class="flipper-info-left"></span>
                            <span class="flipper-info-pager-text">3 of 5</span>
                            <span class="flipper-info-right"></span>
                        </div>
                        <?php 
                    }
                    $c++;
                    ?>
                    </div>
                    <?php 
                }
                ?>
                    <?php 
            }
            ?>
                    <?php 
            if ($featured->post_count > 1) {
                ?>
                    <ul class="flex-direction-nav">
                        <li>
                            <span class="flipper-main-left"></span>
                        </li>
                        <li>
                            <span class="flipper-main-right"></span>
                        </li>
                    </ul>
                    <?php 
            }
            ?>
                </div>
            </div>
        </div>
        <?php 
        }
        ?>
	<?php 
        wp_enqueue_script('mod-flipper');
    }
}
コード例 #14
0
ファイル: front-page.php プロジェクト: bill-riley/show_2015
            if (has_post_thumbnail()) {
                ?>
				<aside class="entry-image">
					<?php 
                the_post_thumbnail('large');
                ?>
				</aside>
				<?php 
            }
            ?>
				<?php 
            if (class_exists('MultiPostThumbnails') && MultiPostThumbnails::has_post_thumbnail($post->post_type, $post->post_type . '-secondary', $post->ID)) {
                ?>
					<aside class="entry-image">
						<?php 
                MultiPostThumbnails::the_post_thumbnail($post->post_type, $post->post_type . '-secondary', $post->ID, 'large');
                ?>
					</aside>
					<?php 
            }
            ?>
					<?php 
            $url = get_post_meta($post->ID, 'entry-url', true);
            if (!empty($url)) {
                ?>
					<aside class="entry-url">
						<?php 
                $youtube = strpos(strtolower($url), 'youtube.com');
                ?>
						<?php 
                $vimeo = strpos(strtolower($url), 'vimeo.com');
コード例 #15
0
ファイル: content-archive.php プロジェクト: jun200/wordpress
?>
" title="<?php 
printf(esc_attr__('Permalink to %s', 'magazino'), the_title_attribute('echo=0'));
?>
" rel="bookmark"><?php 
_e('&#9654;', 'magazino');
?>
</a></div>
    
	<?php 
//Checks for plugin..
if (class_exists('MultiPostThumbnails') && MultiPostThumbnails::has_post_thumbnail(get_post_type(), 'grid-thumbnail', strval(get_the_ID()))) {
    ?>

    <div class="post-box-img"><?php 
    MultiPostThumbnails::the_post_thumbnail(get_post_type(), 'grid-thumbnail');
    ?>
</div>
      
    <?php 
} else {
    //Plugin not installed
    ?>
    
      <?php 
    //Checks for attached post image instead
    $postimgs =& get_children(array('post_parent' => $post->ID, 'post_type' => 'attachment', 'post_mime_type' => 'image', 'orderby' => 'menu_order', 'order' => 'ASC', 'exclude' => get_post_thumbnail_id()));
    if (!empty($postimgs)) {
        $firstimg = array_shift($postimgs);
        $th_image = wp_get_attachment_image($firstimg->ID, array(500, 500), false);
        ?>
コード例 #16
0
ファイル: slideshow.php プロジェクト: natduffy/wp-sandbox
				<?php 
        if ($links_disabled) {
            ?>
											
		    		<?php 
            MultiPostThumbnails::the_post_thumbnail($post_type, 'slidewhow_image', NULL, 'ttrust_slideshow_image_full');
            ?>
							
				<?php 
        } else {
            ?>
					<a href="<?php 
            the_permalink();
            ?>
" rel="bookmark" ><?php 
            MultiPostThumbnails::the_post_thumbnail($post_type, 'slidewhow_image', NULL, 'ttrust_slideshow_image_full');
            ?>
</a>	
				<?php 
        }
        ?>
				<?php 
        if ($slide_text) {
            ?>
					<div class="flex-caption">
						<p><?php 
            echo $slide_text;
            ?>
</p>
					</div>
				<?php 
コード例 #17
0
        ?>
">
    <div class="row pt12">
      <div class="container">
        <div class="col-md-5 text-center">
          <?php 
        $our_queried_page = get_page_by_title($custom_fields['original_entry_number'][0], 'OBJECT', $custom_fields['taxonomy-tier'][0]);
        ?>
          <?php 
        echo get_the_post_thumbnail($our_queried_page->ID, 'large');
        ?>
          <?php 
        if (class_exists('MultiPostThumbnails') && MultiPostThumbnails::has_post_thumbnail($our_queried_page->post_type, $our_queried_page->post_type . '-secondary', $our_queried_page->ID)) {
            ?>
          <?php 
            MultiPostThumbnails::the_post_thumbnail($our_queried_page->post_type, $our_queried_page->post_type . '-secondary', $our_queried_page->ID, 'large');
            ?>
          <?php 
        }
        ?>
        </div>
        <div class="col-lg-7 mt6 description">
        <h2 class="uppercase mb2 pb2"><?php 
        the_title();
        ?>
</h2>
        <h4 class="uppercase mb2 pb2">by <?php 
        echo $custom_fields['student_name'] ? $custom_fields['student_name'][0] : $custom_fields['company_name'][0];
        ?>
</h4>
          <h5 class="uppercase mb2 pb2"><?php 
コード例 #18
0
<section class="level-2">
  <div class="row">
    <div class="medium-8 columns package-category-listing ">
      <?php 
if (have_posts()) {
    while (have_posts()) {
        the_post();
        ?>
      <h1><?php 
        the_title();
        ?>
</h1>
      <?php 
        if (class_exists('MultiPostThumbnails')) {
            MultiPostThumbnails::the_post_thumbnail(get_post_type(), 'landing-page-image');
        }
        ?>

      <div class="package-intro"><?php 
        the_content();
        ?>
</div>
      <p><?php 
        edit_post_link();
        ?>
</p>
      <hr>
      <?php 
    }
}
コード例 #19
0
						<?php 
        $large_image_url = wp_get_attachment_image_src(get_post_thumbnail_id(), 'large');
        echo '<a href="' . $large_image_url[0] . '" title="' . the_title_attribute('echo=0') . '" alt="" class="tx-colorbox">';
        the_post_thumbnail('folio-silder');
        echo '</a>';
        if (class_exists('MultiPostThumbnails')) {
            $large_image_url1 = wp_get_attachment_image_src(MultiPostThumbnails::get_post_thumbnail_id(get_post_type(), 'feature-image-2', $post->ID), 'large');
            if ($large_image_url1) {
                echo '<a href="' . $large_image_url1[0] . '" title="' . the_title_attribute('echo=0') . '" class="tx-colorbox">';
                MultiPostThumbnails::the_post_thumbnail(get_post_type(), 'feature-image-2', NULL, 'folio-silder');
                echo '</a>';
            }
            $large_image_url2 = wp_get_attachment_image_src(MultiPostThumbnails::get_post_thumbnail_id(get_post_type(), 'feature-image-3', $post->ID), 'large');
            if ($large_image_url2) {
                echo '<a href="' . $large_image_url2[0] . '" title="' . the_title_attribute('echo=0') . '" class="tx-colorbox">';
                MultiPostThumbnails::the_post_thumbnail(get_post_type(), 'feature-image-3', NULL, 'folio-silder');
                echo '</a>';
            }
        }
        ?>

						</div>
						<?php 
        ?>
                        
						
					</header><!-- .entry-header -->
                    <?php 
    }
    ?>
コード例 #20
0
    post_class();
    ?>
>
            <header class="entry-header">
 
                <!-- Display featured image in right-aligned floating div -->
                <div class="studentPhoto">
	            <a href="<?php 
    the_permalink();
    ?>
" title="<?php 
    echo esc_attr(sprintf(__('Permalink to %s', 'twentytwelve'), the_title_attribute('echo=0')));
    ?>
" rel="bookmark"><?php 
    if (class_exists('MultiPostThumbnails')) {
        MultiPostThumbnails::the_post_thumbnail(get_post_type(), 'secondary-image');
    }
    ?>
</a>
            </div>
 
                <!-- Display Title and Author Name -->
                <strong>Title: </strong><a href="<?php 
    the_permalink();
    ?>
" title="<?php 
    echo esc_attr(sprintf(__('Permalink to %s', 'twentytwelve'), the_title_attribute('echo=0')));
    ?>
" rel="bookmark"><?php 
    the_title();
    ?>
コード例 #21
0
function loop_blogpost()
{
    if (have_posts()) {
        while (have_posts()) {
            the_post();
            $postid = get_the_ID();
            $summary = get_post_meta($postid, 'summary', 1);
            ?>
										
											<article class="article_post">
												<header>
													<h2 class="single_title">
													<a href="<?php 
            the_permalink();
            ?>
"><?php 
            the_title();
            ?>
</a>
													</h2>
													<p class="meta-info">
													<i class="fa fa-user fa-fw"></i>	
													<a href="
																<?php 
            $userid = get_the_author_meta('ID');
            echo get_author_posts_url($userid);
            ?>
														    ">
														    
														    <?php 
            the_author();
            $user_post_count = count_user_posts($userid);
            echo '&nbsp;(' . $user_post_count . ')';
            ?>

														</a> <i class="fa fa-tags fa-fw"></i><?php 
            the_category(', ');
            ?>
 <i class="fa fa-clock-o fa-fw"></i><?php 
            the_time('F j, Y');
            ?>
 <i class="fa fa-comments fa-fw"></i><?php 
            $comments_count = wp_count_comments();
            echo $comments_count->total_comments . '&nbsp;Comments';
            ?>
													</p>
												</header>
												<div class="post_thumbnails">
					 		
					 
													<?php 
            if (class_exists('MultiPostThumbnails')) {
                MultiPostThumbnails::the_post_thumbnail(get_post_type(), 'secondary-image', NULL, 'post-secondary-image-thumbnail');
            }
            ?>
												</div>
												<div class="article_summary">
												<?php 
            echo $summary;
            ?>
		
												</div>
												<div class="readmore">
														<a href="<?php 
            the_permalink();
            ?>
">Full Story</a>
												</form>
												
												</div>
											</article>
										
										<?php 
        }
    }
    ?>
	
												
										<?php 
}