예제 #1
0
  <div id="sidebar" class="visible-desktop">
  <?php 
if (is_active_sidebar('sidebar')) {
    dynamic_sidebar('sidebar');
} else {
    ?>
    <?php 
    //recent comments widget from zAlive
    ?>
    <div id="zalive_widget_recentcomments" class="widget widget_zalive_widget_recentcomments">
      <h3 class="widget-title  widget_primary_title"><?php 
    _e('Recent Comments', 'zAlive');
    ?>
<b class="caret"></b></h3>
      <ul><?php 
    zAlive_recentComments(7, 40, 50);
    ?>
</ul>
    </div>
    <?php 
    $zAlive_widget_args = array('before_title' => '<h3 class="widget-title  widget_primary_title">', 'after_title' => '<b class="caret"></b></h3>');
    //WP_Widget_Recent_Posts
    the_widget('WP_Widget_Recent_Posts', null, $zAlive_widget_args);
    //WP_Widget_Categories
    the_widget('WP_Widget_Categories', 'hierarchical=1', $zAlive_widget_args);
    //WP_Widget_Pages
    the_widget('WP_Widget_Pages', null, $zAlive_widget_args);
    //WP_Widget_Archives
    the_widget('WP_Widget_Archives', null, $zAlive_widget_args);
    //WP_Widget_Tag_Cloud
    the_widget('WP_Widget_Tag_Cloud', null, $zAlive_widget_args);
예제 #2
0
 function widget($args, $instance)
 {
     extract($args);
     $title = apply_filters('widget_title', empty($instance['title']) ? '' : $instance['title'], $instance, $this->id_base);
     echo $before_widget;
     if (!empty($title)) {
         echo $before_title . $title . $after_title;
     }
     echo '<ul>';
     zAlive_recentComments($instance['limit'], $instance['avatarSize'], $instance['excerptLength']);
     echo '</ul>';
     echo $after_widget;
 }