Revision: 30368
                            
                                                            
                                    
                                        
Initial Code
                                    
                                    
                                                            
                                    
                                        
Initial URL
                                    
                                    
                                
                                                            
                                    
                                        
Initial Description
                                    
                                    
                                                            
                                    
                                        
Initial Title
                                    
                                    
                                                            
                                    
                                        
Initial Tags
                                    
                                    
                                                            
                                    
                                        
Initial Language
                                    
                                    
                                                    
                        at August 13, 2010 00:18 by vagrantradio
                            
                            Initial Code
<?php if (is_user_logged_in() ) { //only logged in user can see this ?>
<div><p>You are logged in!</p></div>
<?php } ?>
<?php if ( current_user_can( 'delete_others_posts' ) ) { //only admins and editors can see this ?>
   <p>You are an admin</p>
<?php } else { ?>
   <p>You are not an admin</p>
<?php } ?>
                                Initial URL
Initial Description
Customize as needed using user roles.
Initial Title
Show/Hide Content Based On User Role in WordPress
Initial Tags
wordpress
Initial Language
PHP