Add post excerpt to events and combine overview section
This commit is contained in:
14
templates/event-overview.php
Normal file
14
templates/event-overview.php
Normal file
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
/**
|
||||
* Event Results/Details
|
||||
*
|
||||
* @author ThemeBoy
|
||||
* @package SportsPress/Templates
|
||||
* @version 1.9
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
||||
?>
|
||||
<div class="sp-event-overview">
|
||||
<?php do_action( 'sportspress_event_overview_content' ); ?>
|
||||
</div>
|
||||
19
templates/post-excerpt.php
Normal file
19
templates/post-excerpt.php
Normal file
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
/**
|
||||
* Post Excerpt
|
||||
*
|
||||
* @author ThemeBoy
|
||||
* @package SportsPress/Templates
|
||||
* @version 1.9
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
||||
|
||||
$id = get_the_ID();
|
||||
$post = get_post( $id );
|
||||
$excerpt = $post->post_excerpt;
|
||||
if ( $excerpt ) {
|
||||
?>
|
||||
<p class="sp-excerpt"><?php echo $excerpt; ?></p>
|
||||
<?php
|
||||
}
|
||||
Reference in New Issue
Block a user