Display player list on front end
This commit is contained in:
@@ -43,8 +43,16 @@ function sportspress_the_content( $content ) {
|
||||
|
||||
// Display league table
|
||||
$content .= '<p>' . sp_get_table_html( $post->ID ) . '</p>';
|
||||
|
||||
elseif ( is_singular( 'sp_list' ) && in_the_loop() ):
|
||||
|
||||
global $post;
|
||||
|
||||
// Display player list
|
||||
$content .= '<p>' . sp_get_list_html( $post->ID ) . '</p>';
|
||||
|
||||
endif;
|
||||
|
||||
return $content;
|
||||
}
|
||||
add_filter('the_content', 'sportspress_the_content');
|
||||
|
||||
Reference in New Issue
Block a user