Add post excerpt to events and combine overview section

This commit is contained in:
Brian Miyaji
2015-09-17 12:26:30 +10:00
parent 3b551c460a
commit 735cbdbd2b
4 changed files with 111 additions and 15 deletions

View File

@@ -44,6 +44,16 @@ function sp_body_class( $classes ) {
$classes[] = 'sportspress-page';
}
if ( 'sp_event' == get_post_type() ) {
$id = get_the_ID();
if ( get_option( 'sportspress_event_show_maps', 'yes' ) == 'yes' && get_the_terms( $id, 'sp_venue' ) ) {
$classes[] = 'sp-has-venue';
}
if ( 'results' == sp_get_status( $id ) ) {
$classes[] = 'sp-has-results';
}
}
return array_unique( $classes );
}
@@ -68,6 +78,22 @@ if ( ! function_exists( 'sportspress_taxonomy_archive_description' ) ) {
}
}
/** Single Post ********************************************************/
if ( ! function_exists( 'sportspress_output_post_excerpt' ) ) {
/**
* Output the post excerpt.
*
* @access public
* @subpackage Excerpt
* @return void
*/
function sportspress_output_post_excerpt() {
sp_get_template( 'post-excerpt.php' );
}
}
/** Single Event ********************************************************/
if ( ! function_exists( 'sportspress_output_event_logos' ) ) {
@@ -123,6 +149,19 @@ if ( ! function_exists( 'sportspress_output_event_details' ) ) {
sp_get_template( 'event-details.php' );
}
}
if ( ! function_exists( 'sportspress_output_event_overview' ) ) {
/**
* Output the event details, venue, and results.
*
* @access public
* @subpackage Event/Overview
* @return void
*/
function sportspress_output_event_overview() {
sp_get_template( 'event-overview.php' );
}
}
if ( ! function_exists( 'sportspress_output_event_venue' ) ) {
/**