Beispiel #1
0
function alaya_recent_posts_shortcode($atts, $content = "")
{
    extract(shortcode_atts(array('title' => '', 'number' => '5', 'category_name' => '', 'thumbnail' => 'yes'), $atts));
    $str = '<div class="widget">';
    if ($title != '') {
        $str .= '<h6 class="widget_title">' . $title . '</h6>';
    }
    $str .= alaya_post_list($number, $thumbnail, $category_name);
    $str .= '</div>';
    return $str;
}
Beispiel #2
0
 function widget($args, $instance)
 {
     extract($args);
     $title = apply_filters('widget_title', $instance['title']);
     $number = $instance['number'];
     $thumbnail = $instance['thumbnail'];
     $widgetID = alaya_random_string(6, false);
     $category = alaya_cat_slug($instance['category']);
     echo $before_widget;
     echo $before_title;
     echo esc_attr($title);
     echo $after_title;
     echo alaya_post_list($number, $thumbnail, $category);
     echo $after_widget;
 }
Beispiel #3
0
    return;
}
?>
      <div id="bottom_widget">
         <div class="container">
	       <section class="four columns">
	        <?php 
if (!dynamic_sidebar('bottom_widget_1')) {
    ?>
		      <div class="widget">
		          <h6 class="widget_title"><?php 
    _e('RECENT POSTS', 'alaya');
    ?>
</h6>
		          <?php 
    echo alaya_post_list(5, 'yes', '');
    ?>
		      </div>
            <?php 
}
?>
	      </section>
	      
	      <section class="four columns">
	          <?php 
if (!dynamic_sidebar('bottom_widget_2')) {
    ?>
		      <div class="widget">
		        <h6 class="widget_title"><?php 
    _e('RECENT COMMENTS', 'alaya');
    ?>