• I am trying to have a widget displayed for a specific user but unfortunately I cannot get it to work.

    I have found out how to get the current user id and display a text for this user only, but I don’t know how to convert to Widget Logic code.

    This is what I am trying to do:

    <?php
    $user_id = get_current_user_id();
    if ($user_id == 3) {
        echo 'Show Widget.';
    }
    ?>

    Can anyone tell me how I can get the above to work with Widget Logic?

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘[Plugin: Widget Logic] Display widget for specific user only’ is closed to new replies.