Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
function team_mate_block_function( $atts, $content ) {
extract( shortcode_atts( array(
'name' => '',
'status' => '',
'profile_image' => '',
'description' => ''
), $atts ) );
ob_start();
?>
<div class="col-md-3 col-sm-4">
<div class="team-thumb">
<div class="team-img">
<?php $banner = wp_get_attachment_url($profile_image, 'full'); ?>
<img src="<?php echo $banner ; ?>" alt="">
</div>
<div class="team-caption">
<div class="team-header">
<h3 class="name"><?php echo $name; ?></h3>
<h4 class="post-title"><?php echo $status; ?></h4>
</div>
<p><?php echo $description; ?></p>
</div>
</div>
</div>
<?php
$content = ob_get_contents();
ob_get_clean();
return $content;
}
add_shortcode( 'team_mate', 'team_mate_block_function' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment