| 1 |
<?php |
|---|
| 2 |
|
|---|
| 3 |
This is the default sidebar.php with additional code to show contextual lists of most popular posts. |
|---|
| 4 |
For example, when browsing a category, the most popular posts in that category are shown, when |
|---|
| 5 |
browsing a month, the most popular posts for that month are shown, etc. |
|---|
| 6 |
|
|---|
| 7 |
*/ ?> |
|---|
| 8 |
|
|---|
| 9 |
<div id="sidebar"> |
|---|
| 10 |
<ul> |
|---|
| 11 |
|
|---|
| 12 |
<li> |
|---|
| 13 |
<?php include (TEMPLATEPATH . '/searchform.php'); ?> |
|---|
| 14 |
</li> |
|---|
| 15 |
|
|---|
| 16 |
<!-- Author information is disabled per default. Uncomment and fill in your details if you want to use it. |
|---|
| 17 |
<li><h2>Author</h2> |
|---|
| 18 |
<p>A little something about you, the author. Nothing lengthy, just an overview.</p> |
|---|
| 19 |
</li> |
|---|
| 20 |
--> |
|---|
| 21 |
|
|---|
| 22 |
<li> |
|---|
| 23 |
<?php if (is_404()) { ?> |
|---|
| 24 |
<?php } elseif (is_category()) { ?> |
|---|
| 25 |
<p>You are currently browsing the archives for the <?php single_cat_title(''); ?> category.</p> |
|---|
| 26 |
|
|---|
| 27 |
<li><h2>Most Popular in '<?php single_cat_title(''); ?>'</h2> |
|---|
| 28 |
<ul> |
|---|
| 29 |
<?php akpc_most_popular_in_cat(); ?> |
|---|
| 30 |
</ul> |
|---|
| 31 |
</li> |
|---|
| 32 |
|
|---|
| 33 |
<?php } elseif (is_day()) { ?> |
|---|
| 34 |
<p>You are currently browsing the <a href="<?php echo get_settings('siteurl'); ?>"><?php echo bloginfo('name'); ?></a> weblog archives |
|---|
| 35 |
for the day <?php the_time('l, F jS, Y'); ?>.</p> |
|---|
| 36 |
|
|---|
| 37 |
<?php } elseif (is_month()) { ?> |
|---|
| 38 |
<p>You are currently browsing the <a href="<?php echo get_settings('siteurl'); ?>"><?php echo bloginfo('name'); ?></a> weblog archives |
|---|
| 39 |
for <?php the_time('F, Y'); ?>.</p> |
|---|
| 40 |
|
|---|
| 41 |
<li><h2>Most Popular in <?php the_time('F, Y'); ?></h2> |
|---|
| 42 |
<ul> |
|---|
| 43 |
<?php akpc_most_popular_in_month(); ?> |
|---|
| 44 |
</ul> |
|---|
| 45 |
</li> |
|---|
| 46 |
|
|---|
| 47 |
<?php } elseif (is_year()) { ?> |
|---|
| 48 |
<p>You are currently browsing the <a href="<?php echo get_settings('siteurl'); ?>"><?php echo bloginfo('name'); ?></a> weblog archives |
|---|
| 49 |
for the year <?php the_time('Y'); ?>.</p> |
|---|
| 50 |
|
|---|
| 51 |
<?php } elseif (is_search()) { ?> |
|---|
| 52 |
<p>You have searched the <a href="<?php echo get_settings('siteurl'); ?>"><?php echo bloginfo('name'); ?></a> weblog archives |
|---|
| 53 |
for <strong>'<?php echo wp_specialchars($s); ?>'</strong>. If you are unable to find anything in these search results, you can try one of these links.</p> |
|---|
| 54 |
|
|---|
| 55 |
<?php } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?> |
|---|
| 56 |
<p>You are currently browsing the <a href="<?php echo get_settings('siteurl'); ?>"><?php echo bloginfo('name'); ?></a> weblog archives.</p> |
|---|
| 57 |
|
|---|
| 58 |
<?php } ?> |
|---|
| 59 |
</li> |
|---|
| 60 |
|
|---|
| 61 |
<?php if (!is_archive() && !is_category()) { ?> |
|---|
| 62 |
<li><h2>Most Popular Posts</h2> |
|---|
| 63 |
<ul> |
|---|
| 64 |
<?php akpc_most_popular(); ?> |
|---|
| 65 |
</ul> |
|---|
| 66 |
</li> |
|---|
| 67 |
<?php } ?> |
|---|
| 68 |
|
|---|
| 69 |
<?php wp_list_pages('title_li=<h2>Pages</h2>' ); ?> |
|---|
| 70 |
|
|---|
| 71 |
<li><h2>Archives</h2> |
|---|
| 72 |
<ul> |
|---|
| 73 |
<?php wp_get_archives('type=monthly'); ?> |
|---|
| 74 |
</ul> |
|---|
| 75 |
</li> |
|---|
| 76 |
|
|---|
| 77 |
<li><h2>Categories</h2> |
|---|
| 78 |
<ul> |
|---|
| 79 |
<?php wp_list_cats('sort_column=name&optioncount=1&hierarchical=0'); ?> |
|---|
| 80 |
</ul> |
|---|
| 81 |
</li> |
|---|
| 82 |
|
|---|
| 83 |
<?php if ( is_home() || is_page() ) { ?> |
|---|
| 84 |
<?php get_links_list(); ?> |
|---|
| 85 |
|
|---|
| 86 |
<li><h2>Meta</h2> |
|---|
| 87 |
<ul> |
|---|
| 88 |
<?php wp_register(); ?> |
|---|
| 89 |
<li><?php wp_loginout(); ?></li> |
|---|
| 90 |
<li><a href="http://validator.w3.org/check/referer" title="This page validates as XHTML 1.0 Transitional">Valid <abbr title="eXtensible HyperText Markup Language">XHTML</abbr></a></li> |
|---|
| 91 |
<li><a href="http://gmpg.org/xfn/"><abbr title="XHTML Friends Network">XFN</abbr></a></li> |
|---|
| 92 |
<li><a href="http://wordpress.org/" title="Powered by WordPress, state-of-the-art semantic personal publishing platform.">WordPress</a></li> |
|---|
| 93 |
<?php wp_meta(); ?> |
|---|
| 94 |
</ul> |
|---|
| 95 |
</li> |
|---|
| 96 |
<?php } ?> |
|---|
| 97 |
|
|---|
| 98 |
</ul> |
|---|
| 99 |
</div> |
|---|