Created
August 29, 2019 15:29
-
-
Save kadimi/4c70845dac2f01073d0a148be2f26890 to your computer and use it in GitHub Desktop.
Venue archive template
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 main template file. | |
* | |
* This is the most generic template file in a WordPress theme | |
* and one of the two required files for a theme (the other being style.css). | |
* It is used to display a page when nothing more specific matches a query. | |
* E.g., it puts together the home page when no home.php file exists. | |
* 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 | |
$venue_taxonomy_id = get_queried_object()->term_id; | |
$meta = get_option( 'taxonomy_' . $venue_taxonomy_id ); | |
$description = term_description( $venue_taxonomy_id ); | |
?> | |
<article id="venue-<?php the_ID(); ?>" class="venue-archive"> | |
<header class="venue-header"> | |
<?php | |
the_archive_title( '<h1 class="venue-title">', '</h1>' ); | |
?> | |
</header> | |
<?php | |
echo '<div class="venue-map">' . sp_get_template( 'venue-map.php', array( 'meta' => $meta ) ) . '</div>'; | |
echo '<div class="venue-description">' . do_shortcode( $description ) . '</div>'; | |
?> | |
</article> | |
</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