Skip to content

Instantly share code, notes, and snippets.

@jp1971
Created April 1, 2020 16:02
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 jp1971/d23b2a573973b529ed914663747b5848 to your computer and use it in GitHub Desktop.
Save jp1971/d23b2a573973b529ed914663747b5848 to your computer and use it in GitHub Desktop.
<?php
// Headshot
function xqum_image_left( $atts, $content = null ){
return"
<div class='xqum-image-left'>
$content
</div>";
}
add_shortcode( 'image-left', 'xqum_image_left' );
function xqum_person( $atts, $content = null ){
extract( shortcode_atts( array(
'name' => null,
'title' => null
), $atts ) );
return "
<div class='xqum-person'>
<h2>{$name}</h2>
<div class='title'>{$title}</div>
<div class='bio'>"
$content
"</div>
</div>";
}
add_shortcode( 'person', 'xqum_person' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment