not really known
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

68 rader
1.9 KiB

  1. <?php
  2. /**
  3. * The template for displaying archive pages
  4. *
  5. * Used to display archive-type pages if nothing more specific matches a query.
  6. * For example, puts together date-based pages if no date.php file exists.
  7. *
  8. * If you'd like to further customize these archive views, you may create a
  9. * new template file for each one. For example, tag.php (Tag archives),
  10. * category.php (Category archives), author.php (Author archives), etc.
  11. *
  12. * @link https://codex.wordpress.org/Template_Hierarchy
  13. *
  14. * @package WordPress
  15. * @subpackage Twenty_Fifteen
  16. * @since Twenty Fifteen 1.0
  17. */
  18. get_header(); ?>
  19. <section id="primary" class="content-area">
  20. <main id="main" class="site-main" role="main">
  21. <?php if ( have_posts() ) : ?>
  22. <header class="page-header">
  23. <?php
  24. the_archive_title( '<h1 class="page-title">', '</h1>' );
  25. the_archive_description( '<div class="taxonomy-description">', '</div>' );
  26. ?>
  27. </header><!-- .page-header -->
  28. <?php
  29. // Start the Loop.
  30. query_posts($query_string . '&orderby=title&order=ASC');
  31. while ( have_posts() ) : the_post();
  32. /*
  33. * Include the Post-Format-specific template for the content.
  34. * If you want to override this in a child theme, then include a file
  35. * called content-___.php (where ___ is the Post Format name) and that will be used instead.
  36. */
  37. get_template_part( 'content', get_post_format() );
  38. // End the loop.
  39. endwhile;
  40. // Previous/next page navigation.
  41. the_posts_pagination( array(
  42. 'prev_text' => __( 'Previous page', 'twentyfifteen' ),
  43. 'next_text' => __( 'Next page', 'twentyfifteen' ),
  44. 'before_page_number' => '<span class="meta-nav screen-reader-text">' . __( 'Page', 'twentyfifteen' ) . ' </span>',
  45. ) );
  46. // If no content, include the "No posts found" template.
  47. else :
  48. get_template_part( 'content', 'none' );
  49. endif;
  50. ?>
  51. </main><!-- .site-main -->
  52. </section><!-- .content-area -->
  53. <?php get_footer(); ?>