WordPress Dashboard controls the contents and settings of a blog. It’s easy to add a widget in WordPress Dashboard, if you want to post a notice to a specific group of users. It’s also useful if you’re a Theme Developer and want to add a specific widget about Theme support on the Dashboard. Adding a custom widget is simple. Just open your functions.php and add the following code:
if(current_user_can('subscriber')){
add_action('wp_dashboard_setup', 'subscriber_dashboard_widgets');
}
function subscriber_dashboard_widgets() {
global $wp_meta_boxes;
wp_add_dashboard_widget('custom_help_widget', 'WIDGET TITLE', 'custom_dashboard_widget');
}
function custom_dashboard_widget() {
echo '<p>ADD YOUR MESSAGE HERE. ADD A PARAGRAPH TAG FOR A NEW LINE.</p>';
}






{ 4 comments… read them below or add one }
I implemented this few hours ago in one of my friend’s my blog to say the least your code worked like a charm.
One more thing how can I remove the gravatar part?
Obasi Miracle invites you to read Download Kingsoft Office Professional v8.1
Gravatar Part?? From where??
Sahil Umatia invites you to read Should You Advertise on Social Media Sites?
Thanks for this great article. I was looking to do something like this in some of my blogs for users with contributor rights. Hopefully I can use this code to implement this.
Nishadha invites you to read Creative Programming Quotes
This is working very well, Thanks
TrendyWp invites you to read XMarket