コード例 #1
0
ファイル: loop-event.php プロジェクト: alysilv/sila
                  <?php 
    if ($price != '') {
        ?>
                <span class="event-cost"><i class="icon-key"></i><span> <?php 
        echo $price;
        ?>
</span></span>
                 <?php 
    }
    ?>
            </div>
        </div>
        <div class="clear"></div>
        
        <?php 
    $thumb = st_post_thumbnail($post->ID, 'st_medium');
    if ($thumb) {
        ?>
        <div class="blog-thumb-wrapper cpt-thumb-wrapper">
            <?php 
        echo $thumb;
        ?>
        </div>
        <?php 
    }
    ?>
        
        <div class="blog-excerpt">
            <?php 
    the_excerpt();
    ?>
コード例 #2
0
ファイル: event.php プロジェクト: alysilv/sila
            <?php 
if ($price != '') {
    ?>
        <span class="event-cost"><i class="icon-key"></i><span> <?php 
    echo $price;
    ?>
</span></span>
         <?php 
}
?>
    </div>
       
    <div class="page-content">
    
     <?php 
$thumb_html = st_post_thumbnail($post->ID, 'st_medium', false, true);
if ($page < 2 && $thumb_html != '') {
    ?>
        <div class="page-featured-image cpt-thumb-wrapper">
        <?php 
    echo $thumb_html;
    ?>
        </div>
      <?php 
}
?>
                                              
        <?php 
do_action('st_before_the_content', $post);
echo '<div class="text-content">';
the_content();
コード例 #3
0
ファイル: related-portfolio.php プロジェクト: alysilv/sila
    public function widget($args, $instance)
    {
        // outputs the content of the widget
        global $post, $wpdb;
        extract($args);
        $title = apply_filters('widget_title', $instance['title']);
        $number = intval($instance['number']);
        if ($number <= 0) {
            $number = 3;
            // default  = 3;
        }
        $backup = $post;
        $tags = wp_get_post_tags($post->ID);
        $tagIDs = array();
        if ($tags) {
            $tagcount = count($tags);
            for ($i = 0; $i < $tagcount; $i++) {
                $tagIDs[$i] = $tags[$i]->term_id;
            }
            $args = array('tag__in' => $tagIDs, 'post__not_in' => array($post->ID), 'numpost' => $number, 'post_type' => 'post');
            $query_posts = get_posts($args);
            if ($query_posts) {
                // display title of widget
                echo $before_widget;
                if (!empty($title)) {
                    echo $before_title . $title . $after_title;
                }
                ?>
            
            
            <ul class="related-posts">
                <?php 
                foreach ($query_posts as $post) {
                    setup_postdata($post);
                    ?>
                        
                        <li class="widget-post-wrapper">
                        	<div class="widget-post-thumb">
                              <?php 
                    echo st_post_thumbnail($post->ID);
                    ?>
                              </div>
                        	<div class="widget-post-content">
                        		<h3 class="widget-post-title"><a <?php 
                    echo $title;
                    ?>
 href="<?php 
                    the_permalink();
                    ?>
" title=""><?php 
                    the_title();
                    ?>
</a></h3>
                        		<span class="widget-post-meta"><?php 
                    the_time('M j, Y');
                    ?>
 - <span><?php 
                    comments_number(__('0 Comment', 'smooththemes'), __('1 Comment', 'smooththemes'), __('% Comments', 'smooththemes'));
                    ?>
</span></span>
                        	</div>
                        </li>
                <?php 
                }
                ?>
             </ul>
            <?php 
                echo $after_widget;
            }
            // end if have posts
        }
        // end is Tags
        wp_reset_query();
    }
コード例 #4
0
ファイル: loop-post.php プロジェクト: FameThemes/stToolKit
			<h2 class="entry-title">
				<a  title="<?php 
printf(esc_attr__('Permalink to %s', 'smooththemes'), the_title_attribute('echo=0'));
?>
"  rel="bookmark" href="<?php 
the_permalink();
?>
"><?php 
the_title();
?>
</a>
			</h2>
		</header>

    <?php 
$thumb = st_post_thumbnail($post->ID, false, false);
?>
    <?php 
if ($thumb != '') {
    ?>
    <div class="post-thumbnail">
        <?php 
    echo $thumb;
    ?>
    </div>
    <?php 
}
?>
        
        <div class="entry-excerpt">
			<?php 
コード例 #5
0
ファイル: loop-post.php プロジェクト: alysilv/sila
    ?>
</span>
                <?php 
    the_author_posts_link();
    ?>
                </span>
                <span class="blog-comment"><i class="icon-comments-alt"></i><span> <?php 
    comments_number(__('0 Comment', 'smooththemes'), __('1 Comment', 'smooththemes'), __('% Comments', 'smooththemes'));
    ?>
 </span>
            </div>
        </div>

        <?php 
    $image_size = isset($settings['image_size']) && $settings['image_size'] != '' ? $settings['image_size'] : 'st_medium';
    $thumb_html = st_post_thumbnail($post->ID, $image_size);
    if ($thumb_html) {
        ?>
        <div class="<?php 
        echo $thumb_class;
        ?>
  blog-thumb-wrapper">                     
            <?php 
        echo $thumb_html;
        ?>
            
            <div class="clear"></div>
        </div>
        <?php 
    }
    ?>