semplice shortcode con contenuto
<?php
//con il contenuto in mezzo
function titoletto1($atts, $content = null) {
return "<h3 class=\"titoletto1\">$content</h3>";
}
add_shortcode('titoletto1','titoletto1');
//paddo un parametro
function vSeparator( $atts ){
$attributi = shortcode_atts( array(
'height' => 14
), $atts );
$height = $attributi['height'];
return "<hr class=\"vSeparator\" style=\"height:" . $height . "px\">";
}
add_shortcode( 'vSeparator', 'vSeparator' );