• Hi,

    I’m using the tesseract theme with the Ultimate members plugin, I want the buttons I’ve put in the header to change depending on whether a user is logged in or out, how might i do this?

    all the best,

    Henry

    • This topic was modified 9 years, 6 months ago by henrbarc.
Viewing 1 replies (of 1 total)
  • This isn’t a support board for UM customization. However, I’ll give you this code this time so that you can modify it or make your own conclusions:

    <?php 
    global $user_login, $current_user; 
    
    if (is_user_logged_in()) {
        get_currentuserinfo();
        $user_info = get_userdata($current_user->ID);
        if (in_array('admin', $user_info->roles)) { 
    ?>    
    
    your button code goes here
    
    <?php
        }
    }
    ?>  

    If you can’t make heads or tails of it, then take it to http://stackoverflow.com/ to ask how to modify it to suit your needs.

    Then post your findings back here so others might benefit with the information.

    Good luck,

Viewing 1 replies (of 1 total)

The topic ‘Shortcode to restrict content based on user status’ is closed to new replies.