PageRenderTime 57ms CodeModel.GetById 32ms RepoModel.GetById 0ms app.codeStats 0ms

/wp-content/themes/catch-box/category.php

https://github.com/ActivateNY/activateny.org
PHP | 60 lines | 35 code | 14 blank | 11 comment | 4 complexity | eb60fd90026d12561b63c2b89ba0c6da MD5 | raw file
Possible License(s): GPL-2.0, AGPL-1.0, LGPL-2.1
  1. <?php
  2. /**
  3. * The template for displaying Category Archive pages.
  4. *
  5. * @package Catch Themes
  6. * @subpackage Catch_Box
  7. * @since Catch Box 1.0
  8. */
  9. get_header(); ?>
  10. <?php if ( have_posts() ) : ?>
  11. <header class="page-header">
  12. <h1 class="page-title"><?php
  13. printf( __( 'Category Archives: %s', 'catchbox' ), '<span>' . single_cat_title( '', false ) . '</span>' );
  14. ?></h1>
  15. <?php
  16. $category_description = category_description();
  17. if ( ! empty( $category_description ) )
  18. echo apply_filters( 'category_archive_meta', '<div class="category-archive-meta">' . $category_description . '</div>' );
  19. ?>
  20. </header>
  21. <?php /* Start the Loop */ ?>
  22. <?php while ( have_posts() ) : the_post(); ?>
  23. <?php
  24. /* Include the Post-Format-specific template for the content.
  25. * If you want to overload this in a child theme then include a file
  26. * called content-___.php (where ___ is the Post Format name) and that will be used instead.
  27. */
  28. get_template_part( 'content', get_post_format() );
  29. ?>
  30. <?php endwhile; ?>
  31. <?php catchbox_content_nav( 'nav-below' ); ?>
  32. <?php else : ?>
  33. <article id="post-0" class="post no-results not-found">
  34. <header class="entry-header">
  35. <h1 class="entry-title"><?php _e( 'Nothing Found', 'catchbox' ); ?></h1>
  36. </header><!-- .entry-header -->
  37. <div class="entry-content">
  38. <p><?php _e( 'Apologies, but no results were found for the requested archive. Perhaps searching will help find a related post.', 'catchbox' ); ?></p>
  39. <?php get_search_form(); ?>
  40. </div><!-- .entry-content -->
  41. </article><!-- #post-0 -->
  42. <?php endif; ?>
  43. </div><!-- #content -->
  44. </div><!-- #primary -->
  45. <?php get_sidebar(); ?>
  46. <?php get_footer(); ?>