-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
105 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
<?php | ||
/* | ||
Template Name: Archives | ||
*/ | ||
?> | ||
|
||
|
||
<?php get_header(); ?> | ||
<div id="content"> | ||
<?php | ||
$debut = 0; //The first article to be displayed | ||
?> | ||
|
||
<?php while(have_posts()) : the_post(); ?> | ||
<h2><?php the_title(); ?></h2> | ||
|
||
<ul id="archives"> | ||
<div class="alignright search"><form role="search" method="get" id="searchform" action="http://excid3.com/blog/"> | ||
<div> | ||
<input type="text" value="" name="s" id="s" placeholder="Search Terms"> | ||
<input type="submit" id="searchsubmit" value="Search"> | ||
</div> | ||
</form></div> | ||
|
||
<?php | ||
$myposts = get_posts('numberposts=-1&offset=$debut'); | ||
$last_post_date = ""; | ||
foreach($myposts as $post) : | ||
$post_date = mysql2date("Y", $post->post_date_gmt); | ||
if ($last_post_date != $post_date) { | ||
$last_post_date = $post_date; | ||
?> | ||
<li class="archive-year"><?php echo $last_post_date?></li> | ||
<?php } ?> | ||
|
||
<li><span class="archive-date"><?php the_time('M j') ?></span> <a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li> | ||
<?php endforeach; ?> | ||
</ul> | ||
<?php endwhile; ?> | ||
</div> | ||
|
||
<?php get_sidebar(); ?> | ||
<?php get_footer(); ?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,4 +27,3 @@ | |
</body> | ||
|
||
</html> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,9 @@ | ||
<div id="sidebar"> | ||
<ul> | ||
<li class="icons"><a href="http://feeds.feedburner.com/excid3"><img src="/images/rss.png" /></a><a href="http://excid3.com/blog/contact"><img src="/images/email.png" /></a><a href="http://github.com/excid3"><img src="/images/github.png" /></a><a href="http://twitter.com/excid3/"><img src="/images/twitter.png" /></a> </li> | ||
<li><a href="http://excid3.com/blog/about/">about me</a></li> | ||
<li><a href="http://currentprojects.heroku.com/">projects</a></li> | ||
<li><a href="http://excid3.com/blog/books">books</a> </li> | ||
</ul> | ||
<br /> | ||
<hr /> | ||
<p><iframe src="http://githubbadge.appspot.com/badge/excid3" style="border: 0;height: 125px;width: 200px;overflow: hidden;"></iframe></p> | ||
<hr /> | ||
<p><a href="http://feedburner.google.com/fb/a/mailverify?uri=excid3&loc=en_US">Subscribe by Email</a></p> | ||
</div> | ||
<div id="sidebar"> | ||
<ul> | ||
<li><a href="http://twitter.com/excid3">@excid3</a></li> | ||
<li><a href="http://github.com/excid3">github</a></li> | ||
<li><a href="mailto:chris@excid3.com?subject=hello!">say hello</a></li> | ||
<li><a href="http://excid3.com/blog/archives/">archives</a></li> | ||
<li><a href="http://excid3.com/blog/about/">rss feed</a></li> | ||
</ul> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters