Hide featured image if image is loaded in template
This commit is contained in:
@@ -124,14 +124,14 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Featured Image */
|
/* Featured Image */
|
||||||
.single-sp_team .wp-post-image,
|
.single-sp_team.sp-show-image .wp-post-image,
|
||||||
.single-sp_player .wp-post-image,
|
.single-sp_player.sp-show-image .wp-post-image,
|
||||||
.single-sp_staff .wp-post-image {
|
.single-sp_staff.sp-show-image .wp-post-image {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
.single-sp_team .sp-template .wp-post-image,
|
.single-sp_team.sp-show-image .sp-template .wp-post-image,
|
||||||
.single-sp_player .sp-template .wp-post-image,
|
.single-sp_player.sp-show-image .sp-template .wp-post-image,
|
||||||
.single-sp_staff .sp-template .wp-post-image {
|
.single-sp_staff.sp-show-image .sp-template .wp-post-image {
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -44,7 +44,9 @@ function sp_body_class( $classes ) {
|
|||||||
$classes[] = 'sportspress-page';
|
$classes[] = 'sportspress-page';
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( 'sp_event' == get_post_type() ) {
|
$post_type = get_post_type();
|
||||||
|
|
||||||
|
if ( 'sp_event' == $post_type ) {
|
||||||
$id = get_the_ID();
|
$id = get_the_ID();
|
||||||
if ( get_option( 'sportspress_event_show_maps', 'yes' ) == 'yes' && get_the_terms( $id, 'sp_venue' ) ) {
|
if ( get_option( 'sportspress_event_show_maps', 'yes' ) == 'yes' && get_the_terms( $id, 'sp_venue' ) ) {
|
||||||
$classes[] = 'sp-has-venue';
|
$classes[] = 'sp-has-venue';
|
||||||
@@ -52,6 +54,12 @@ function sp_body_class( $classes ) {
|
|||||||
if ( 'results' == sp_get_status( $id ) ) {
|
if ( 'results' == sp_get_status( $id ) ) {
|
||||||
$classes[] = 'sp-has-results';
|
$classes[] = 'sp-has-results';
|
||||||
}
|
}
|
||||||
|
} elseif ( 'sp_team' == $post_type && 'yes' == get_option( 'sportspress_team_show_logo', 'yes' ) ) {
|
||||||
|
$classes[] = 'sp-show-image';
|
||||||
|
} elseif ( 'sp_player' == $post_type && 'yes' == get_option( 'sportspress_player_show_photo', 'yes' ) ) {
|
||||||
|
$classes[] = 'sp-show-image';
|
||||||
|
} elseif ( 'sp_staff' == $post_type && 'yes' == get_option( 'sportspress_staff_show_photo', 'yes' ) ) {
|
||||||
|
$classes[] = 'sp-show-image';
|
||||||
}
|
}
|
||||||
|
|
||||||
return array_unique( $classes );
|
return array_unique( $classes );
|
||||||
@@ -290,7 +298,7 @@ if ( ! function_exists( 'sportspress_output_league_table' ) ) {
|
|||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
function sportspress_output_league_table() {
|
function sportspress_output_league_table() {
|
||||||
sp_get_template( 'league-table.php' );
|
sp_get_template( 'league-table.php', array( 'title' => __( 'League Table', 'sportspress' ) ) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user