jayemm
Member
Posted 16 years ago #
Hey folks,
I've written a custom widget for a particular user, however I'd like to restrict it to just that user. Does anyone know exactly where the code is to display all of the widgets? Example on the sidebar under Design -> Widgets would be the widget I've written, but trying to display it only for a certain user.
Thanks VERY much!
Jayemm
Wrap everything in the the widget except the sidebar output in a if( ( $current_user->id ) == ???)
jayemm
Member
Posted 16 years ago #
Hmm, I put the widget in wp-includes/widgets.php. I'm not sure where just the sidebar output for the admin is honestly. If I put the if statement in there, it shows on the blog itself only if the person is logged in and matches that username. Could you be a little more specific please? Your feedback is really appreciated, thanks for your time. :)
Jayemm
just a beginner solution hehehe..
make different theme with the widget for the specific user maybe? :D
jayemm
Member
Posted 16 years ago #
indojepang,
The only problem with that is I don't even know where the list of available widgets is stored so I could simply exclude it based on the user logged in as admin. Thanks for the input though. :)