Codes start here.
<code>
<?php
$args = array(
'post_type' => 'betts_team',
'post_status' => 'publish',
'posts_per_page' => -1,
'orderby'=>'menu_order',
'order'=> 'ASC'
);
$team_query = new WP_Query($args);
if($team_query->have_posts()){
while ($team_query->have_posts()) : $team_query->the_post();
$content = get_the_content();
$image= wp_get_attachment_image_src(get_post_thumbnail_id($post->ID),'team-thumb');
if(get_post_meta($post->ID, 'title-people-page', true) !=""){
$title = get_post_meta($post->ID, 'title-people-page', true);
}else{
$title= "";
}
if(get_post_meta($post->ID,'resume-pdf-download-people-page',true) !=""){
$resume = get_post_meta($post->ID,'resume-pdf-download-people-page',true);
}else{
$resume="";
}
if(get_post_meta($post->ID,'email-people-page',true) !=""){
$email= get_post_meta($post->ID,'email-people-page',true);
}else{
$email="";
}
if(get_post_meta($post->ID,'phone-number-people-page',true) !=""){
$phone = get_post_meta($post->ID,'phone-number-people-page',true);
}else{
$phone="";
}
if(get_post_meta($post->ID,'extension-people-page',true) !=""){
$extension = get_post_meta($post->ID,'extension-people-page',true);
}else{
$extension = "";
}
if(get_post_meta($post->ID,'accreditation-logos-people-page',true) !=""){
$images = get_post_meta($post->ID,'accreditation-logos-people-page',true);
}else{
$images = "";
}
?>
</code>
<code>
if($resume[0]['image'] !=""){ ?>
<a href="<?php echo $resume[0]['image']; ?>" target="_blank" class="pdf-link"><span>CV</span></a>
<?php } ?>
</p>
<?php if($email !=""){ ?>
<p class="people-mail"><a href="mailto:<?php echo $email; ?>"><?php echo $email; ?></a></p>
<?php } if($phone !=""){ ?>
<p class="people-tel"><?php echo $phone; ?>
Ext. <span><?php echo $extension; ?></span>
</p>
<?php } if(!empty($images)){ ?>
<p class="people-logo">
<b>Accreditations</b> <br />
<?php
foreach($images as $imgs){
?>
<img src = "<?php echo $imgs['image']; ?>" />
<?php }
echo "</p>";
}
?>
</div>
</div>
<?php endwhile;
wp_reset_query();
}
?>
</code>
<code>
<?php
$args = array(
'post_type' => 'betts_team',
'post_status' => 'publish',
'posts_per_page' => -1,
'orderby'=>'menu_order',
'order'=> 'ASC'
);
$team_query = new WP_Query($args);
if($team_query->have_posts()){
while ($team_query->have_posts()) : $team_query->the_post();
$content = get_the_content();
$image= wp_get_attachment_image_src(get_post_thumbnail_id($post->ID),'team-thumb');
if(get_post_meta($post->ID, 'title-people-page', true) !=""){
$title = get_post_meta($post->ID, 'title-people-page', true);
}else{
$title= "";
}
if(get_post_meta($post->ID,'resume-pdf-download-people-page',true) !=""){
$resume = get_post_meta($post->ID,'resume-pdf-download-people-page',true);
}else{
$resume="";
}
if(get_post_meta($post->ID,'email-people-page',true) !=""){
$email= get_post_meta($post->ID,'email-people-page',true);
}else{
$email="";
}
if(get_post_meta($post->ID,'phone-number-people-page',true) !=""){
$phone = get_post_meta($post->ID,'phone-number-people-page',true);
}else{
$phone="";
}
if(get_post_meta($post->ID,'extension-people-page',true) !=""){
$extension = get_post_meta($post->ID,'extension-people-page',true);
}else{
$extension = "";
}
if(get_post_meta($post->ID,'accreditation-logos-people-page',true) !=""){
$images = get_post_meta($post->ID,'accreditation-logos-people-page',true);
}else{
$images = "";
}
?>
</code>
<code>
if($resume[0]['image'] !=""){ ?>
<a href="<?php echo $resume[0]['image']; ?>" target="_blank" class="pdf-link"><span>CV</span></a>
<?php } ?>
</p>
<?php if($email !=""){ ?>
<p class="people-mail"><a href="mailto:<?php echo $email; ?>"><?php echo $email; ?></a></p>
<?php } if($phone !=""){ ?>
<p class="people-tel"><?php echo $phone; ?>
Ext. <span><?php echo $extension; ?></span>
</p>
<?php } if(!empty($images)){ ?>
<p class="people-logo">
<b>Accreditations</b> <br />
<?php
foreach($images as $imgs){
?>
<img src = "<?php echo $imgs['image']; ?>" />
<?php }
echo "</p>";
}
?>
</div>
</div>
<?php endwhile;
wp_reset_query();
}
?>
</code>
No comments:
Post a Comment