Snippi
A super awesome snippet tool.
- 1.
<?php - 2.
include( TEMPLATEPATH . '/_admin/get-options.php' ); - 3.
get_header(); - 4.
?> - 5.
- 6.
<?php if ($aw_sidebar_position == 'left') get_sidebar(); ?> - 7.
- 8.
<!-- BEGIN .grid-8 --> - 9.
<div class="grid-8" id="archive"> - 10.
- 11.
<?php if (have_posts()) : ?> - 12.
- 13.
<?php - 14.
if(get_query_var('author_name')) : - 15.
$curauth = get_userdatabylogin(get_query_var('author_name')); - 16.
else : - 17.
$curauth = get_userdata(get_query_var('author')); - 18.
endif; - 19.
?> - 20.
- 21.
<!-- BEGIN .entry-header --> - 22.
<div class="entry-header"> - 23.
- 24.
<?php if (is_category()) { ?> - 25.
<h1><?php printf(__('All posts in %s', 'framework'), single_cat_title('',false)); ?></h1> - 26.
<?php } elseif( is_tag() ) { ?> - 27.
<h1><?php printf(__('All posts tagged %s', 'framework'), single_tag_title('',false)); ?></h1> - 28.
<?php } elseif (is_day()) { ?> - 29.
<h1><?php _e('Archive for', 'framework') ?> <?php the_time('d/m/Y'); ?></h1> - 30.
<?php } elseif (is_month()) { ?> - 31.
<h1><?php _e('Archive for', 'framework') ?> <?php the_time('m/Y'); ?></h1> - 32.
<?php } elseif (is_year()) { ?> - 33.
<h1><?php _e('Archive for', 'framework') ?> <?php the_time('Y'); ?></h1> - 34.
<?php } elseif (is_author()) { ?> - 35.
<h1><?php _e('All posts by', 'framework') ?> <?php echo $curauth->display_name; ?></h1> - 36.
<?php } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?> - 37.
<h1><?php _e('Blog archives', 'framework') ?></h1> - 38.
<?php } ?> - 39.
- 40.
</div> - 41.
<!-- END .entry-header --> - 42.
- 43.
<?php - 44.
while (have_posts()) : the_post(); - 45.
?> - 46.
- 47.
<?php - 48.
$format = get_post_format(); - 49.
get_template_part( '_includes/'.$format ); - 50.
if($format == '') get_template_part( '_includes/standard' ); - 51.
?> - 52.
- 53.
<?php endwhile; endif; wp_reset_postdata(); wp_reset_query(); ?> - 54.
- 55.
<?php if (aw_show_posts_nav()) : ?> - 56.
- 57.
<!-- BEGIN .navigation --> - 58.
<div class="navigation margin-20"> - 59.
- 60.
<?php - 61.
global $wp_query; - 62.
$big = 999999999; - 63.
echo paginate_links( - 64.
array( - 65.
'base' => str_replace( $big, '%#%', get_pagenum_link( $big ) ), - 66.
'format' => '?paged=%#%', - 67.
'current' => max( 1, get_query_var('paged') ), - 68.
'total' => $wp_query->max_num_pages - 69.
) - 70.
); - 71.
?> - 72.
- 73.
</div> - 74.
<!-- END .navigation --> - 75.
- 76.
<?php endif; ?> - 77.
- 78.
</div> - 79.
<!-- END .grid-8 --> - 80.
- 81.
<?php if ($aw_sidebar_position == 'right') get_sidebar(); ?> - 82.
- 83.
<div class="clear"></div> - 84.
- 85.
<?php get_footer(); ?>