Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /* Template Name: All Databases */
- /**
- * The template for displaying Archive pages.
- *
- * Learn more: http://codex.wordpress.org/Template_Hierarchy
- *
- * @package GeneratePress
- */
- get_header(); ?>
- <section id="primary" <?php generate_content_class(); ?> itemprop="mainContentOfPage">
- <main id="main" <?php generate_main_class(); ?> itemtype="http://schema.org/Blog" itemscope="itemscope" role="main">
- <?php do_action('generate_before_main_content'); ?>
- <?php if ( have_posts() ) : ?>
- <header class="page-header<?php if ( is_author() ) echo ' clearfix';?>">
- <?php do_action( 'generate_before_archive_title' ); ?>
- <h1 class="page-title">
- <?php
- echo "All Databases" ?>
- </h1>
- <?php do_action( 'generate_after_archive_title' ); ?>
- <?php
- // Show an optional term description.
- $term_description = term_description();
- if ( ! empty( $term_description ) ) :
- printf( '<div class="taxonomy-description">%s</div>', $term_description );
- endif;
- if ( get_the_author_meta('description') && is_author() ) : // If a user has filled out their decscription show a bio on their entries
- echo '<div class="author-info">' . get_the_author_meta('description') . '</div>';
- endif;
- ?>
- <?php do_action( 'generate_after_archive_description' ); ?>
- </header><!-- .page-header -->
- <?php /* Start the Loop */
- $args = array( 'post_type' => array('products', 'retailers'), 'paged' => $paged );
- $query = new WP_Query( $args );
- $wp_query = $query;
- ?>
- <?php while ( $query->have_posts() ) : $query->the_post(); ?>
- <?php
- /* Include the Post-Format-specific template for the content.
- * If you want to override this in a child theme, then include a file
- * called content-___.php (where ___ is the Post Format name) and that will be used instead.
- */
- get_template_part( 'content', 'products-retailers' );
- ?>
- <?php endwhile; ?>
- <?php generate_content_nav( 'nav-below' ); ?>
- <?php else : ?>
- <?php get_template_part( 'no-results', 'archive' ); ?>
- <?php endif; ?>
- <?php do_action('generate_after_main_content'); ?>
- </main><!-- #main -->
- </section><!-- #primary -->
- <?php
- do_action('generate_sidebars');
- get_footer();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement