Skip to content

Instantly share code, notes, and snippets.

@dbasilioesp
Last active April 19, 2016 18:32
Show Gist options
  • Save dbasilioesp/76c804b0a62cc4d208e5 to your computer and use it in GitHub Desktop.
Save dbasilioesp/76c804b0a62cc4d208e5 to your computer and use it in GitHub Desktop.
Shortcode
<?php
// Add Shortcode
function special_title_shortcode( $atts , $content = null ) {
// Attributes
extract( shortcode_atts(
array(
'class' => '',
), $atts )
);
// Code
ob_start();?>
<div class="mediumtitle specialtitle <?php echo $class; ?>">
<?php echo $content; ?>
</div>
<?php
return ob_get_clean();
}
add_shortcode( 'special_title', 'special_title_shortcode' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment