Quote:
Originally Posted by DirtyWhiteBoy
Yea I could hard code it in but I'd like to be able to use it on and off. Like an excerpt for example. If you don't put anything there, nothing shows up. Same idea.
I figured there is plugin for this but I could be wrong.
|
You can create a shortcode for that.
Its easy shit.
Add something like this to ur /wp-content/themes/YOURTHEME/functions.php
PHP Code:
function myNote ($atts, $msg)
{
extract(shortcode_atts(array(
"atts" => '',
"msg" => ''
), $atts));
return '<div style="background-color:#f5f5b7; border-color:#e2d6ac; border-style: dashed; padding:10px;">'.$msg.'</div>';
}
add_shortcode('note', 'myNote');
then, in the post that you want to call, write [note msg="blalbla bla bla"] where you want the warning