示例#1
0
"><?php 
        the_modified_time('d F Y');
        ?>
</time>
											</div>
											<h1 class="blog-post-title-inner single-post-title"><span itemprop="name"><?php 
        the_title();
        ?>
</span></h1>
										</div>
										
										<div class="clear"></div>								
										<?php 
        $btheme_imageid = get_post_thumbnail_id();
        if ($btheme_imageid) {
            $image_url = btheme_getimage($btheme_imageid);
            ?>
<div class="blog-image">
											<img item-prop="image" src="<?php 
            echo aq_resize($image_url, 777, null, true);
            ?>
" alt="<?php 
            the_permalink();
            ?>
" />
										</div>
										<?php 
        }
        ?>
										<div class="blogpost-user-icon float-left"><?php 
        _e('by', 'circolare');
    function widget($args, $instance)
    {
        extract($args);
        $title = apply_filters('widget_title', $instance['title']);
        $post_cat = $instance['post_cat'];
        $post_num = $instance['post_num'];
        $type = $instance['type'];
        echo $before_widget . "\n";
        echo '<div class="latest-comments-list">' . "\n";
        if ($title) {
            echo $before_title . $title . $after_title . "\n";
        }
        ?>
			<?php 
        if ($type == 'popular') {
            $myposts = new WP_Query("orderby=comment_count&showposts={$post_num}&cat={$post_cat}");
        } else {
            $myposts = new WP_Query("showposts={$post_num}&cat={$post_cat}");
        }
        if ($myposts->have_posts()) {
            ?>
			<ul class="sidebar-alt">
			<?php 
            while ($myposts->have_posts()) {
                $myposts->the_post();
                $btheme_imageid = get_post_thumbnail_id();
                ?>
<li class="sidebar-post-single">
					<?php 
                if ($btheme_imageid) {
                    $image_url = btheme_getimage($btheme_imageid);
                    ?>
<div class="sidebar-post-thumb float-left">
						<a href="<?php 
                    the_permalink();
                    ?>
"><img src="<?php 
                    echo aq_resize($image_url, 54, 54, true);
                    ?>
" alt="" /></a>
					</div><?php 
                }
                ?>
					<span class="sidebar-post-title"><a href="<?php 
                the_permalink();
                ?>
"><?php 
                the_title();
                ?>
</a></span>
					<span class="sidebar-post-date<?php 
                if (!$btheme_imageid) {
                    echo " alt-post-date";
                }
                ?>
"><?php 
                the_time('M j, Y');
                ?>
</span>
					<div class="clear"></div>
				</li>
			<?php 
            }
            ?>
			</ul><?php 
        }
        wp_reset_query();
        ?>
		<?php 
        echo "\n" . '</div>' . $after_widget . "\n";
    }