Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save ViewFromTheBox/d0a4328bfc1115c765f71bdadc991b8b to your computer and use it in GitHub Desktop.

Select an option

Save ViewFromTheBox/d0a4328bfc1115c765f71bdadc991b8b to your computer and use it in GitHub Desktop.
For more information, go to: https://sportsbenchwp.com
<div class="player-info-top clearfix">
<div class="player-photo" style="width: 23%; padding: 0 1%; float: left; position: relative">
<?php $photo = $player->get_player_photo(); ?>
<?php if ( $photo == null ) { ?>
<img src="<?php echo plugins_url( 'sports-bench/images/mystery-person.jpg' ); ?>" />
<?php } else { ?>
<?php echo $photo; ?>
<?php } ?>
</div>
<div class="player-info" style="width: 73%; padding: 0 1%; float: right; position: relative">
<h2 class="player-name" style="margin-bottom:5px"><?php echo $player->player_first_name . ' ' . $player->player_last_name; ?></h2>
<h4 class="player-details" style="margin-bottom:5px; margin-top: 0;"><?php echo $player->player_position; ?></h4>
<h4 class="player-details" style="margin-bottom:5px; margin-top: 0;"><?php echo $team->team_name; ?></h4>
<h4 class="player-details" style="margin-bottom:5px; margin-top: 0;"><?php echo $player->player_home_city . ', ' . $player->player_home_state; ?></h4>
<h4 class="player-details" style="margin-bottom:5px; margin-top: 0;"><?php echo __( 'Age: ', 'sports-bench' ) . $player->get_age(); ?></h4>
<h4 class="player-details" style="margin-bottom:5px; margin-top: 0;"><?php echo stripslashes( $player->player_height ) . ' | ' . $player->player_weight; ?></h4>
<div id="sports-bench-player-id" class="hide" style="display: none;"><?php echo $player->player_id; ?></div>
</div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment