PageRenderTime 48ms CodeModel.GetById 19ms RepoModel.GetById 0ms app.codeStats 0ms

/wp-content/themes/ifeature/archive.php

https://github.com/Bochet/festival_lgbt
PHP | 113 lines | 58 code | 29 blank | 26 comment | 8 complexity | 1b16ed707efe9d6d6f760ce634e3aa4b MD5 | raw file
Possible License(s): GPL-2.0, AGPL-1.0, LGPL-2.1
  1. <?php
  2. /**
  3. * Archive Template
  4. *
  5. * Please do not edit this file. This file is part of the Cyber Chimps Framework and all modifications
  6. * should be made in a child theme.
  7. *
  8. * @category CyberChimps Framework
  9. * @package Framework
  10. * @since 1.0
  11. * @author CyberChimps
  12. * @license http://www.opensource.org/licenses/gpl-license.php GPL v2.0 (or later)
  13. * @link http://www.cyberchimps.com/
  14. */
  15. get_header(); ?>
  16. <?php do_action( 'cyberchimps_before_container'); ?>
  17. <div id="container" <?php cyberchimps_filter_container_class(); ?>>
  18. <?php do_action( 'cyberchimps_before_content_container'); ?>
  19. <div id="content" <?php cyberchimps_filter_content_class(); ?>>
  20. <?php do_action( 'cyberchimps_before_content'); ?>
  21. <?php if ( have_posts() ) : ?>
  22. <header class="page-header">
  23. <h2 class="page-title">
  24. <?php
  25. if ( is_category() ) {
  26. printf( __( 'Category Archives: %s', 'cyberchimps' ), '<span>' . single_cat_title( '', false ) . '</span>' );
  27. } elseif ( is_tag() ) {
  28. printf( __( 'Tag Archives: %s', 'cyberchimps' ), '<span>' . single_tag_title( '', false ) . '</span>' );
  29. } elseif ( is_author() ) {
  30. /* Queue the first post, that way we know
  31. * what author we're dealing with (if that is the case).
  32. */
  33. the_post();
  34. printf( __( 'Author Archives: %s', 'cyberchimps' ), '<span class="vcard"><a class="url fn n" href="' . get_author_posts_url( get_the_author_meta( "ID" ) ) . '" title="' . esc_attr( get_the_author() ) . '" rel="me">' . get_the_author() . '</a></span>' );
  35. /* Since we called the_post() above, we need to
  36. * rewind the loop back to the beginning that way
  37. * we can run the loop properly, in full.
  38. */
  39. rewind_posts();
  40. } elseif ( is_day() ) {
  41. printf( __( 'Daily Archives: %s', 'cyberchimps' ), '<span>' . get_the_date() . '</span>' );
  42. } elseif ( is_month() ) {
  43. printf( __( 'Monthly Archives: %s', 'cyberchimps' ), '<span>' . get_the_date( 'F Y' ) . '</span>' );
  44. } elseif ( is_year() ) {
  45. printf( __( 'Yearly Archives: %s', 'cyberchimps' ), '<span>' . get_the_date( 'Y' ) . '</span>' );
  46. } else {
  47. _e( 'Archives', 'cyberchimps' );
  48. }
  49. ?>
  50. </h2>
  51. <?php
  52. if ( is_category() ) {
  53. // show an optional category description
  54. $category_description = category_description();
  55. if ( ! empty( $category_description ) )
  56. echo apply_filters( 'category_archive_meta', '<div class="taxonomy-description">' . $category_description . '</div>' );
  57. } elseif ( is_tag() ) {
  58. // show an optional tag description
  59. $tag_description = tag_description();
  60. if ( ! empty( $tag_description ) )
  61. echo apply_filters( 'tag_archive_meta', '<div class="taxonomy-description">' . $tag_description . '</div>' );
  62. }
  63. ?>
  64. </header>
  65. <?php rewind_posts(); ?>
  66. <?php /* Start the Loop */ ?>
  67. <?php while ( have_posts() ) : the_post(); ?>
  68. <?php
  69. /* Include the Post-Format-specific template for the content.
  70. * If you want to overload this in a child theme then include a file
  71. * called content-___.php (where ___ is the Post Format name) and that will be used instead.
  72. */
  73. get_template_part( 'content', get_post_format() );
  74. ?>
  75. <?php endwhile; ?>
  76. <?php else : ?>
  77. <?php get_template_part( 'no-results', 'archive' ); ?>
  78. <?php endif; ?>
  79. <?php do_action( 'cyberchimps_after_content'); ?>
  80. </div><!-- #content -->
  81. <?php do_action( 'cyberchimps_after_content_container'); ?>
  82. </div><!-- #container .row-fluid-->
  83. <?php do_action( 'cyberchimps_after_container'); ?>
  84. <?php get_footer(); ?>