Skip to content

Instantly share code, notes, and snippets.

@neroze
Last active February 18, 2017 17:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save neroze/cd2fc7c36ff740362feb72b57fa35032 to your computer and use it in GitHub Desktop.
Save neroze/cd2fc7c36ff740362feb72b57fa35032 to your computer and use it in GitHub Desktop.
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