Advertisement
Guest User

Page Template

a guest
Aug 27th, 2015
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.26 KB | None | 0 0
  1. <?php
  2. /* Template Name: All Databases */
  3. /**
  4. * The template for displaying Archive pages.
  5. *
  6. * Learn more: http://codex.wordpress.org/Template_Hierarchy
  7. *
  8. * @package GeneratePress
  9. */
  10.  
  11.  
  12. get_header(); ?>
  13.  
  14. <section id="primary" <?php generate_content_class(); ?> itemprop="mainContentOfPage">
  15. <main id="main" <?php generate_main_class(); ?> itemtype="http://schema.org/Blog" itemscope="itemscope" role="main">
  16. <?php do_action('generate_before_main_content'); ?>
  17. <?php if ( have_posts() ) : ?>
  18.  
  19. <header class="page-header<?php if ( is_author() ) echo ' clearfix';?>">
  20. <?php do_action( 'generate_before_archive_title' ); ?>
  21. <h1 class="page-title">
  22. <?php
  23. echo "All Databases" ?>
  24. </h1>
  25. <?php do_action( 'generate_after_archive_title' ); ?>
  26. <?php
  27. // Show an optional term description.
  28. $term_description = term_description();
  29. if ( ! empty( $term_description ) ) :
  30. printf( '<div class="taxonomy-description">%s</div>', $term_description );
  31. endif;
  32.  
  33. if ( get_the_author_meta('description') && is_author() ) : // If a user has filled out their decscription show a bio on their entries
  34. echo '<div class="author-info">' . get_the_author_meta('description') . '</div>';
  35. endif;
  36. ?>
  37. <?php do_action( 'generate_after_archive_description' ); ?>
  38. </header><!-- .page-header -->
  39.  
  40.  
  41. <?php /* Start the Loop */
  42. $args = array( 'post_type' => array('products', 'retailers'), 'paged' => $paged );
  43. $query = new WP_Query( $args );
  44.  
  45. $wp_query = $query;
  46. ?>
  47. <?php while ( $query->have_posts() ) : $query->the_post(); ?>
  48.  
  49. <?php
  50. /* Include the Post-Format-specific template for the content.
  51. * If you want to override this in a child theme, then include a file
  52. * called content-___.php (where ___ is the Post Format name) and that will be used instead.
  53. */
  54. get_template_part( 'content', 'products-retailers' );
  55. ?>
  56.  
  57. <?php endwhile; ?>
  58.  
  59.  
  60.  
  61. <?php generate_content_nav( 'nav-below' ); ?>
  62.  
  63. <?php else : ?>
  64.  
  65. <?php get_template_part( 'no-results', 'archive' ); ?>
  66.  
  67. <?php endif; ?>
  68. <?php do_action('generate_after_main_content'); ?>
  69. </main><!-- #main -->
  70. </section><!-- #primary -->
  71.  
  72. <?php
  73. do_action('generate_sidebars');
  74. get_footer();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement