I try to register a shortcode in Wordpress. To show the problem in a more simple way I use this code:
function moewe_readmore($atts, $content = null) {
extract(shortcode_atts(array(
'posts' => 1,
'class' => '',
), $atts));
$return_string = '<h4>'.$content.'</h4>';
return $return_string;
}
add_shortcode( 'mrm', 'moewe_readmore' );
I add this shortcode to my theme:
<?php echo do_shortcode("[mrm]I am the Headline[mrm]"); ?>
But the output makes an empty "< h4 >" element and the Headline is placed alone in no html tag.
Thanks for you help.
[/mrm]- DaFois