-
Notifications
You must be signed in to change notification settings - Fork 8
/
sidebar.php
147 lines (109 loc) · 5.47 KB
/
sidebar.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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
<div id="sidebar">
<ul class="sb-list clearfix">
<?php
$options = get_option( 'cgp2_theme_options' );
echo $options['cgp2_textbox'];
?>
<?php if (get_option('greenpark2_twitter_enable') == 'yes') { ?>
<li>
<ul class="sb-tools clearfix">
<li class="twitter-icon">
<a class="sb-icon" href="<?php echo 'http://twitter.com/' . get_option('greenpark2_twitter_uri'); ?>" rel="nofollow">
<span><?php _e('Latest Tweet', 'greenpark'); ?></span>
<?php twitter_messages(" . get_option(greenpark2_twitter_uri) . ", 1, false, false, '', false, false, false); ?>
</a>
<p class="sb-icon-text">
<a href="<?php echo 'http://twitter.com/' . get_option('greenpark2_twitter_uri'); ?>" rel="nofollow"><?php _e('Follow me on twitter', 'greenpark'); ?></a>.
</p>
</li>
</ul>
</li>
<?php } ?>
<li>
<ul class="sb-tools clearfix">
<li class="rss-icon">
<a class="sb-icon" href="<?php if (get_option('greenpark2_feed_enable') == 'yes') { echo 'http://feeds.feedburner.com/' . get_option('greenpark2_feed_uri'); } else { echo get_bloginfo('rss2_url'); }?>" title="<?php _e('Subscribe to my feed - You\'ll be happy!', 'greenpark'); ?>">
<span><?php _e('Subscribe', 'greenpark'); ?></span>
<?php _e('Subscribe to my blogs feed', 'greenpark'); ?>
</a>
</li>
</ul>
</li>
<?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('sidebar-1') ) : ?>
<?php endif; // end 1st sidebar widget ?>
<?php if ( is_single() ) { ?>
<li>
<ul class="sb-tools clearfix">
<?php previous_post_link('<li class="previous-post">%link</li>', '<span>' . (__('Previous Entry', 'greenpark')) . '</span> %title'); ?>
<?php next_post_link('<li class="next-post">%link</li>', '<span>' . (__('Next Entry', 'greenpark')) . '</span> %title'); ?>
</ul>
</li>
<?php } ?>
<?php if ( is_front_page() || is_page() ) { ?>
<li id="about" class="clearfix">
<div class="sb-title"><?php echo get_option('greenpark2_sidebar_about_title'); ?></div>
<ul>
<li>
<?php echo get_option('greenpark2_sidebar_about_content');?>
</li>
</ul>
</li>
<?php } ?>
<?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('sidebar-2') ) : ?>
<?php if ( is_404() || is_category() || is_day() || is_month() || is_year() || is_search() || is_paged() ) { ?>
<li class="currently-viewing">
<?php /* If this is a 404 page */ if (is_404()) { ?>
<?php /* If this is a category archive */ } elseif (is_category()) { ?>
<p><?php _e('You are currently browsing the archives for the', 'greenpark'); ?> <?php single_cat_title(''); ?> <?php _e('category', 'greenpark'); ?>.</p>
<?php /* If this is a yearly archive */ } elseif (is_day()) { ?>
<p><?php _e('You are currently browsing the archives for the day', 'greenpark'); ?> <?php the_time('l, F jS, Y'); ?>.</p>
<?php /* If this is a monthly archive */ } elseif (is_month()) { ?>
<p><?php _e('You are currently browsing the archives for', 'greenpark'); ?> <?php the_time('F, Y'); ?>.</p>
<?php /* If this is a yearly archive */ } elseif (is_year()) { ?>
<p><?php _e('You are currently browsing the archives for the year', 'greenpark'); ?> <?php the_time('Y'); ?>.</p>
<?php /* If this is a monthly archive */ } elseif (is_search()) { ?>
<p><?php _e('You have searched for', 'greenpark'); ?> <strong>'<?php the_search_query(); ?>'</strong>.
<?php _e('If you are unable to find anything in these search results, you can try one of these links', 'greenpark'); ?>.</p>
<?php /* If this is a monthly archive */ } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?>
<p><?php _e('You are currently browsing the', 'greenpark'); ?> <a href="<?php echo home_url('url'); ?>/"><?php echo bloginfo('name'); ?></a> <?php _e('blog archives', 'greenpark'); ?>.</p>
<?php } ?>
</li>
<?php }?>
<?php endif; // end 2nd sidebar widget ?>
</ul>
<ul class="group">
<?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('sidebar-3') ) : ?>
<?php if ( is_front_page() || is_page() ) { ?>
<?php wp_list_pages('title_li=<div class="sb-title">' . __('Pages','greenpark') . '</div>' ); ?>
<?php } ?>
<?php if ( is_front_page() || is_day() || is_month() || is_year() ) { ?>
<li class="archives">
<div class="sb-title"><?php _e('Archives', 'greenpark'); ?></div>
<ul>
<?php wp_get_archives('type=monthly'); ?>
</ul>
</li>
<?php } ?>
<?php if ( is_front_page() || is_category() ) { ?>
<?php wp_list_categories('show_count=1&title_li=<div class="sb-title">' . __('Categories','greenpark') . '</div>'); ?>
<?php } ?>
<?php endif; // end 3rd sidebar widgets ?>
</ul>
<ul class="group">
<?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('sidebar-4') ) : ?>
<?php if ( is_front_page() ) { ?>
<?php wp_list_bookmarks('title_before=<div class="sb-title">&title_after=</div>'); ?>
<?php } ?>
<?php if ( is_front_page() || is_page() ) { ?>
<li id="meta">
<div class="sb-title"><?php _e('Meta', 'greenpark'); ?></div>
<ul>
<?php wp_register(); ?>
<li><?php wp_loginout(); ?></li>
<?php wp_meta(); ?>
</ul>
</li>
<?php } ?>
<?php endif; // end 4th sidebar widgets ?>
</ul>
</div> <!-- #sidebar -->