View Single Post
Old 02-27-2011, 01:39 PM  
MrGusMuller
Confirmed User
 
MrGusMuller's Avatar
 
Industry Role:
Join Date: Oct 2010
Location: Portugal
Posts: 1,262
Quote:
Originally Posted by DirtyWhiteBoy View Post
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
__________________
StagCMS - Adult CMS - user friendly adult content management system - speed up your websites with no SQL connections
ICQ: 63*23*43*113


Last edited by MrGusMuller; 02-27-2011 at 01:44 PM..
MrGusMuller is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote