Fix view counter

This commit is contained in:
Brian Miyaji
2014-05-06 17:21:06 +10:00
parent c5b3c77fbb
commit de988777bd

View File

@@ -294,7 +294,7 @@ if ( !function_exists( 'sp_get_post_views' ) ) {
delete_post_meta( $post_id, $count_key );
add_post_meta( $post_id, $count_key, '0' );
endif;
if ( isset( $views ) && $views == 1 )
if ( $count == 1 )
return __( '1 view', 'sportspress' );
else
return sprintf( __( '%s views', 'sportspress' ), $count );