| 1 |
<?php |
| 2 |
|
| 3 |
/* |
| 4 |
* @Author ParaTheme |
| 5 |
* @Folder Team/Themes |
| 6 |
* @version 3.0.5 |
| 7 |
|
| 8 |
* Copyright: 2015 ParaTheme |
| 9 |
*/ |
| 10 |
|
| 11 |
if ( ! defined('ABSPATH')) exit; // if direct access |
| 12 |
|
| 13 |
|
| 14 |
include team_plugin_dir.'/templates/team-grid-variables.php'; |
| 15 |
|
| 16 |
|
| 17 |
$html = ''; |
| 18 |
|
| 19 |
$html .= '<div class="team-container team-container-'.$post_id.'" > |
| 20 |
<div id="team-'.$post_id.'" class="team-items team-'.$team_themes.'">'; |
| 21 |
|
| 22 |
|
| 23 |
include team_plugin_dir.'/templates/team-grid-query.php'; |
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
if ( $wp_query->have_posts() ) : |
| 28 |
|
| 29 |
$i=0; |
| 30 |
|
| 31 |
while ( $wp_query->have_posts() ) : $wp_query->the_post(); |
| 32 |
|
| 33 |
|
| 34 |
$team_member_position = get_post_meta(get_the_ID(), 'team_member_position', true ); |
| 35 |
$team_member_social_links = get_post_meta( get_the_ID(), 'team_member_social_links', true ); |
| 36 |
|
| 37 |
$team_member_link_to_post = get_post_meta( get_the_ID(), 'team_member_link_to_post', true ); |
| 38 |
|
| 39 |
$team_thumb = wp_get_attachment_image_src( get_post_thumbnail_id(get_the_ID()), $team_items_thumb_size ); |
| 40 |
$team_thumb_url = $team_thumb['0']; |
| 41 |
|
| 42 |
|
| 43 |
$html.= '<div class="team-item" >'; |
| 44 |
|
| 45 |
|
| 46 |
$class_team_functions = new class_team_functions(); |
| 47 |
if(empty($team_grid_items)) |
| 48 |
{ |
| 49 |
$team_grid_items = $class_team_functions->team_grid_items(); |
| 50 |
|
| 51 |
} |
| 52 |
|
| 53 |
foreach($team_grid_items as $key=>$name) |
| 54 |
{ |
| 55 |
|
| 56 |
if(empty($team_grid_items_hide[$key])) |
| 57 |
{ |
| 58 |
include team_plugin_dir.'templates/team-grid-'.$key.'.php'; |
| 59 |
} |
| 60 |
|
| 61 |
} |
| 62 |
|
| 63 |
|
| 64 |
$html.= '</div>'; |
| 65 |
|
| 66 |
|
| 67 |
$i++; |
| 68 |
|
| 69 |
endwhile; |
| 70 |
|
| 71 |
$html .= '</div>'; |
| 72 |
|
| 73 |
include team_plugin_dir.'/templates/team-grid-paginate.php'; |
| 74 |
|
| 75 |
|
| 76 |
wp_reset_query(); |
| 77 |
|
| 78 |
endif; |
| 79 |
|
| 80 |
$html .= '</div>'; |
| 81 |
|
| 82 |
if($team_masonry_enable == 'yes' ) |
| 83 |
{ |
| 84 |
$html .= '<script> |
| 85 |
jQuery(window).load(function(){ jQuery("#team-'.$post_id.'.team-items").masonry({isFitWidth: true}); }); |
| 86 |
</script>'; |
| 87 |
|
| 88 |
// masonry css to center align |
| 89 |
$html .= '<style type="text/css"> |
| 90 |
|
| 91 |
#team-'.$post_id.'.team-items { |
| 92 |
margin: 0 auto !important; |
| 93 |
} |
| 94 |
</style> |
| 95 |
'; |
| 96 |
} |
| 97 |
|
| 98 |
|
| 99 |
|
| 100 |
|
| 101 |
|
| 102 |
|
| 103 |
|
| 104 |
|
| 105 |
|
| 106 |
|
| 107 |
|
| 108 |
|
| 109 |
|
| 110 |
|
| 111 |
|