SHARE
TWEET

WordPress User Level Conditional Logic

a guest Mar 27th, 2012 115 Never
  1. <?php if (current_user_can('level_0)) {
  2.     echo do_shortcode('[enter download-monitor shortcode here]'); }  
  3.                          
  4. elseif (current_user_can('level_1)) {
  5.      echo do_shortcode('[enter download-monitor shortcode here]'); }  
  6.                          
  7. elseif (current_user_can('level_2)) {
  8.     echo do_shortcode('[enter download-monitor shortcode here]'); }  
  9.                        
  10. elseif (current_user_can('level_3)) {
  11.      echo do_shortcode('[enter download-monitor shortcode here]'); }  
  12.                        
  13. elseif (current_user_can('level_4)) {
  14.     echo do_shortcode('[enter download-monitor shortcode here]'); }  
  15.  
  16. elseif (current_user_can('level_5)) {
  17.      echo do_shortcode('[enter download-monitor shortcode here]'); }  
  18.                        
  19. elseif (current_user_can('level_6)) {
  20.     echo do_shortcode('[enter download-monitor shortcode here]'); }  
  21.                          
  22. ?>
RAW Paste Data
Top