Last active
February 18, 2017 17:47
-
-
Save neroze/cd2fc7c36ff740362feb72b57fa35032 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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