// à ajouter dans le "functions.php" du thème, pas celui qui est dans "/wp-includes"
function jamall_function($atts,$content='')
{
$a = shortcode_atts(array(
'color' => 'red',
'float' => false,
'pd' => 10,
),$atts);
return '<div style="margin-bottom:27px;background-color:'.$a['color'].';'.($a['float']?'float:'.$a['float'].';':'').'padding:'.$a['pd'].'px;">'.do_shortcode($content).'</div><div style="clear:both;"></div>';
}
add_shortcode('jamall','jamall_function'); // exemple : [jamall color="lightgreen" float="left" pd="20"]Trop choquer et déçu[/jamall]
Comments