WordPress.org

Support

Support » Plugins and Hacks » [Resolved] [Plugin: Members] Using Widget Logic to hide widget by Role

[Resolved] [Plugin: Members] Using Widget Logic to hide widget by Role

  • using Members I created a new role. Now I want to show or hide certain widgets based on the WP Role. How do I do this?

    I tried if ( current_user_can( 'role' ) ) but it does not seem to work. This:

    <?php
    if ( current_user_can( 'energy' ) )
    echo "Yeah!" ;
    else
    echo "Nope";
    ?>

    does work in a PHP Widget only there the widget will be shown at all times, just with a different content. If I cannot use this code in Widget Logic with the Role created by Members I might have to go for simple PHP in a PHP widget. But in that case certain special widgets can no longer be used unless I add the code to the template.

    http://wordpress.org/extend/plugins/members/

Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Resolved] [Plugin: Members] Using Widget Logic to hide widget by Role’ is closed to new replies.