Guest User

Untitled

a guest
Feb 4th, 2018
110
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. $group = get_post_meta( get_the_ID(), 'football_league_table_option', true );
  3. $counter = 0;
  4. if ( ! empty( $group ) ) {
  5. foreach ( $group as $group ) { ?>
  6. <?php $counter++; ?>
  7.  
  8. <?php $team_table = isset( $group['football_select_team'] ) ? $group['football_select_team'] : '';
  9. $team_played = isset( $group['football_team_match_played_stat'] ) ? $group['football_team_match_played_stat'] : '';
  10. $team_win = isset( $group['football_team_win_stat'] ) ? $group['football_team_win_stat'] : '';
  11. $team_draw = isset( $group['football_team_draw_stat'] ) ? $group['football_team_draw_stat'] : '';
  12. $team_goal_scored = isset( $group['football_team_goal_scored'] ) ? $group['football_team_goal_scored'] : '';
  13. $team_goal_conceded =isset( $group['football_team_goal_conceded'] ) ? $group['football_team_goal_conceded'] : '';
  14. $team_total_goals = ($team_goal_scored+$team_goal_conceded );
  15. $team_loss = $team_played-($team_win+$team_draw);
  16. $team_goal_difference = $team_goal_scored- $team_goal_conceded;
  17. $team_points =($team_win*3)+ ($team_draw*1) ; ?>
  18. <!-- start point-table-row-->
  19. <div class="point-tabe-content">
  20. <?php echo $counter; ?>
  21. </div>
  22. <div class="point-table-row">
  23. <div class="point-tabe-content">
  24. <span class="table-team-image"><?php echo get_the_post_thumbnail($team_table);?></span>
  25. </div>
  26. <div class="point-tabe-content table-team-name">
  27. <?php echo get_the_title($team_table); ?>
  28. </div>
  29. <div class="point-tabe-content">
  30. <?php echo $team_played; ?>
  31. </div>
  32. <div class="point-tabe-content">
  33. <?php echo $team_win; ?>
  34. </div>
  35. <div class="point-tabe-content">
  36. <?php echo $team_loss; ?>
  37. </div>
  38. <div class="point-tabe-content">
  39. <?php echo $team_draw; ?>
  40. </div>
  41. <div class="point-tabe-content">
  42. <?php echo $team_goal_scored; ?>
  43. </div>
  44. <div class="point-tabe-content">
  45. <?php echo $team_goal_conceded; ?>
  46. </div>
  47. <div class="point-tabe-content">
  48. <?php echo $team_goal_difference; ?>
  49. </div>
  50. <div class="point-tabe-content">
  51. <?php echo $team_points; ?>
  52. </div>
  53. </div><!--point-table-row end -->
  54. <?php }
  55. }
  56. ?>
  57. </div><!-- point-table-body end -->
RAW Paste Data