forked from TamerShlash/Sampression-Lite
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsidebar-right.php
63 lines (50 loc) · 1.94 KB
/
sidebar-right.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
<?php
// Exit if accessed directly
if ( !defined('ABSPATH')) exit;
/**
* The Sidebar containing the Right widget area.
*
* @package Sampression-Lite
* @since Sampression Lite 1.0
*/
?>
<aside id="sidebar" class="columns four sidebar-right" role="complementary">
<?php
// Showing Default Widgets untill User put any widget in "Right Sidebar"
if (!dynamic_sidebar('right-sidebar')) : ?>
<section class="widget">
<header class="widget-title"><?php _e('Most Popular', 'sampression'); ?></header>
<div class="widget-entry">
<?php $args = array(
'showposts' => 5,
'orderby' => 'comment_count'
);
query_posts($args);
if (have_posts()):
?>
<ul class="widget-popular-posts">
<?php while (have_posts()) : the_post(); ?>
<li><a href="<?php the_permalink() ?>" title="<?php echo esc_attr( get_the_title() ); ?>" rel="bookmark" ><?php the_title(); ?></a></li>
<?php endwhile; ?>
</ul>
<?php endif; ?>
</div>
</section><!-- end of .widget -->
<section class="widget">
<header class="widget-title"><?php _e('Categories', 'sampression'); ?></header>
<div class="widget-entry">
<ul class="widget-categories">
<?php wp_list_categories('title_li'); ?>
</ul>
</div>
</section><!-- end of .widget -->
<section class="widget">
<header class="widget-title"><?php _e('Archive', 'sampression'); ?></header>
<div class="widget-entry">
<ul class="widget-categories">
<?php wp_get_archives(); ?>
</ul>
</div>
</section><!-- end of .widget -->
<?php endif; //end of home-widget-1 ?>
</aside>