Last active
July 13, 2019 17:32
-
-
Save kadimi/37c60dfc488c7ec7ab27f9799c320482 to your computer and use it in GitHub Desktop.
SportsPress events archive template using event blocks
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* The template for displaying archive pages. | |
* | |
* Learn more: http://codex.wordpress.org/Template_Hierarchy | |
* | |
* @package Rookie | |
*/ | |
get_header(); ?> | |
<div id="primary" class="content-area content-area-<?php echo rookie_get_sidebar_setting(); ?>-sidebar"> | |
<main id="main" class="site-main" role="main"> | |
<?php if ( have_posts() ) : ?> | |
<header class="page-header entry-header"> | |
<?php | |
the_archive_title( '<h1 class="page-title entry-title">', '</h1>' ); | |
the_archive_description( '<div class="taxonomy-description">', '</div>' ); | |
?> | |
</header><!-- .page-header --> | |
<?php /* Start the Loop */ ?> | |
<?php while ( have_posts() ) : the_post(); ?> | |
<?php echo do_shortcode( '[event_blocks event="' . get_the_ID() . '"]' ); ?> | |
<?php endwhile; ?> | |
<?php if ( function_exists( 'rookie_paging_nav') ) rookie_paging_nav(); ?> | |
<?php else : ?> | |
<?php get_template_part( 'content', 'none' ); ?> | |
<?php endif; ?> | |
</main><!-- #main --> | |
</div><!-- #primary --> | |
<?php get_sidebar(); ?> | |
<?php get_footer(); ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment