Hi to the community,
i try to build a shortcode that prints the Creative Commons logo and some text,
everything is working fine except that i put the shortcode at the end of the post but the shortcode goes to the top of the post content,
i use the code bellow:
<?php // Creative Commons License Shortcode
function creativecommons( $atts, $content = null )
{
extract( shortcode_atts( array(
'type' => '',
'code' => '',
), $atts ) );
{ ?>
<div class="license">
<div class="cc-img">
<img src="<?php bloginfo('template_directory'); ?>/images/cc.png" width="32" height="32" alt="Creative Commons License" />
</div>
<div class="cc-content">
<h4><?php echo $type ?></h4>
<small><?php echo $code ?></small>
</div>
</div><!-- end of license -->
<div class="clear"></div><!-- clear div -->
<?php }
return;
}
add_shortcode('cc1', 'creativecommons');
?>
I'm missing something here or something else have to do with my problem?
Thanks a lot,
Philip