Beispiel #1
0
    ?>
">
								<a href="<?php 
    the_permalink();
    ?>
" rel="<?php 
    _e("bookmark", "solostream");
    ?>
" title="<?php 
    _e("Permanent Link to", "solostream");
    ?>
 <?php 
    the_title();
    ?>
"><?php 
    solostream_thumbnail();
    ?>
</a>
								<p class="sitemap-title"><a href="<?php 
    the_permalink();
    ?>
" rel="<?php 
    _e("bookmark", "solostream");
    ?>
" title="<?php 
    _e("Permanent Link to", "solostream");
    ?>
 <?php 
    the_title();
    ?>
"><?php 
    function widget($args, $instance)
    {
        global $post;
        $post_old = $post;
        // Save the post object.
        extract($args);
        /* Our variables from the widget settings. */
        $title = apply_filters('widget_title', $instance['title']);
        $tag = $instance['tag'];
        // Get array of post info.
        $feat_posts = new WP_Query("showposts=" . $instance["num"] . "&tag=" . $tag);
        /* Before widget (defined by themes). */
        echo $before_widget;
        /* Display the widget title if one was input (before and after defined by themes). */
        if ($title) {
            echo $before_title . $title . $after_title;
        }
        // Post list
        echo "<div class='cat-posts-widget textwidget'>\n";
        while ($feat_posts->have_posts()) {
            $feat_posts->the_post();
            ?>
				<div class="post">
					<div class="entry clearfix">
						<a href="<?php 
            the_permalink();
            ?>
" rel="<?php 
            _e("bookmark", "solostream");
            ?>
" title="<?php 
            _e("Permanent Link to", "solostream");
            ?>
 <?php 
            the_title();
            ?>
"><?php 
            solostream_thumbnail();
            ?>
</a>
						<p class="post-title"><a href="<?php 
            the_permalink();
            ?>
" rel="<?php 
            _e("bookmark", "solostream");
            ?>
" title="<?php 
            _e("Permanent Link to", "solostream");
            ?>
 <?php 
            the_title();
            ?>
"><?php 
            the_title();
            ?>
</a></p>
						<?php 
            the_excerpt();
            ?>
					</div>
					<?php 
            include TEMPLATEPATH . "/postinfo.php";
            ?>
					<div style="clear:both;"></div>
				</div>
		<?php 
        }
        echo "</div>\n";
        echo $after_widget;
        remove_filter('excerpt_length', $new_excerpt_length);
        $post = $post_old;
        // Restore the post object.
    }