PageRenderTime 44ms CodeModel.GetById 18ms RepoModel.GetById 1ms app.codeStats 0ms

/archive.php

https://github.com/saas786/GoldenStrap
PHP | 74 lines | 56 code | 4 blank | 14 comment | 7 complexity | d621383e8be924573356c8d642c01f88 MD5 | raw file
Possible License(s): Apache-2.0
  1. <!-- archive -->
  2. <?php
  3. /**
  4. * The template for displaying Archive pages.
  5. *
  6. * Used to display archive-type pages if nothing more specific matches a query.
  7. * For example, puts together date-based pages if no date.php file exists.
  8. *
  9. * Learn more: http://codex.wordpress.org/Template_Hierarchy
  10. *
  11. * @package WordPress
  12. * @subpackage WP-Bootstrap
  13. * @since WP-Bootstrap 0.6
  14. */
  15. get_header();
  16. if (have_posts() ) ;?>
  17. <div class="row">
  18. <div class="container">
  19. <?php if (function_exists('bootstrapwp_breadcrumbs')) bootstrapwp_breadcrumbs(); ?>
  20. </div><!--/.container -->
  21. </div><!--/.row -->
  22. <div class="container">
  23. <header class="jumbotron subhead" id="overview">
  24. <h1><?php
  25. if ( is_day() ) {
  26. printf( __( 'Daily Archives: %s', 'bootstrapwp' ), '<span>' . get_the_date() . '</span>' );
  27. } elseif ( is_month() ) {
  28. printf( __( 'Monthly Archives: %s', 'bootstrapwp' ), '<span>' . get_the_date( _x( 'F Y', 'monthly archives date format', 'bootstrapwp' ) ) . '</span>' );
  29. } elseif ( is_year() ) {
  30. printf( __( 'Yearly Archives: %s', 'bootstrapwp' ), '<span>' . get_the_date( _x( 'Y', 'yearly archives date format', 'bootstrapwp' ) ) . '</span>' );
  31. } elseif ( is_tag() ) {
  32. printf( __( 'Tag Archives: %s', 'bootstrapwp' ), '<span>' . single_tag_title( '', false ) . '</span>' );
  33. // Show an optional tag description
  34. $tag_description = tag_description();
  35. if ( $tag_description )
  36. echo apply_filters( 'tag_archive_meta', '<div class="tag-archive-meta">' . $tag_description . '</div>' );
  37. } elseif ( is_category() ) {
  38. printf( __( 'Category Archives: %s', 'bootstrapwp' ), '<span>' . single_cat_title( '', false ) . '</span>' );
  39. // Show an optional category description
  40. $category_description = category_description();
  41. if ( $category_description )
  42. echo apply_filters( 'category_archive_meta', '<div class="category-archive-meta">' . $category_description . '</div>' );
  43. } else {
  44. _e( 'Blog Archives', 'bootstrapwp' );
  45. }
  46. ?></h1>
  47. </h1>
  48. </header>
  49. <div class="row content">
  50. <div class="span8">
  51. <?php while ( have_posts() ) : the_post(); ?>
  52. <div <?php post_class(); ?>>
  53. <a href="<?php the_permalink(); ?>" title="<?php the_title();?>"><h3><?php the_title();?></h3></a>
  54. <p class="meta"><?php echo bootstrapwp_posted_on();?></p>
  55. <div class="row">
  56. <div class="span2">
  57. <a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>" >
  58. <?php echo catch_that_image();?></a>
  59. </div><!-- /.span2 -->
  60. <div class="span6">
  61. <?php the_excerpt();?>
  62. </div><!-- /.span6 -->
  63. </div><!-- /.row -->
  64. <hr />
  65. </div><!-- /.post_class -->
  66. <?php endwhile; ?>
  67. <?php bootstrapwp_content_nav('nav-below');?>
  68. </div><!-- /.span8 -->
  69. <?php get_sidebar('blog'); ?>
  70. <?php get_footer(); ?>