Widget Logic
Logic to appear widget at current user's profile page only (5 posts)

  1. frostfairs
    Posted 3 years ago #

    I am afraid if is there any logic which 'll be effective to show the widget on the profile of current and logged in user only? like in facebook, the left sidebar in facebook is visible at every current user's home page only.


  2. alanft
    Plugin Author

    Posted 3 years ago #

    !is_user_logged_in() -- shown when a user is not logged in

    comes from


    you could use that without the ! at the beginning

  3. frostfairs
    Posted 3 years ago #

    This 'll work and the widget 'll be visible when the user is logged in.
    But is there any way that , this may be visible on the sidebar of the user's profile?
    when the logged in user click on his profile link, he/she found the widget there only, on the sidebar reside his profile?

  4. alanft
    Plugin Author

    Posted 3 years ago #

    Not on the user profile you see at …wordpress/wp-admin/profile.php , as that's in the wp-admin interface which I don't believe can have a widget-y sidebar.

    But you could do it on their post page …/author/user_name using code from this page


    which suggests that

    global $current_user; get_currentuserinfo(); return is_author($current_user->user_login);

    might work

  5. frostfairs
    Posted 3 years ago #

    Am actually talking with the buddypress' perspective. When you have buddypress i think there is no more need for the user, to access the admin interface panel but within the front end of the site, it is possible to change the settings regarding the profile.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic


No tags yet.