Skip to main content
Easily create better & faster websites with the Total WordPress Theme Learn More
(opens a new tab)
Tutorials

Customize Your WordPress Dashboard Welcome Message

Customize Your WordPress Dashboard Welcome Message

It seems that many of you don’t want to show the new feature called “Welcome Panel” since WordPress 3.3. I guess that those who do not want to display this message try to hide this box to their clients, that’s why I thought that instead of hiding it you should customize it and display it with your own content. To display a custom welcome message, we are going to create a small plugin. That way even when upgrading to a new version of WordPress the message  shown will your message and not the default one.

Let’s get started!

Let’s Create A Plugin

To create a plugin, create a new folder under wp-content/plugins, and call it custom-dashboard-message. Within this folder create a file called custom-dashboard-message.php and open it in your code editor (by the way Coda 2 is great!). Simply paste this code in the newly created file:

<?php
/*
Plugin Name: Custom Dahsboard Message
Plugin URL: https://www.wpexplorer.com/
Description: A little plugin to modify default dashboard welcome message
Version: 0.1
Author: WExplorer
Author URI: https://www.wpexplorer.com/
*/

This code simply creates a plugin… yes i know, WordPress is too easy for you!

No we need to create a function that will remove the default dashboard message so that we can after add our own custom welcome panel content. By using remove_action on the welcome_panel hook we remove the default hooked wp_welcome_panel function which returns the content of the welcome panel.

/**
 * Remove the default welcome dashboard message
 *
 * @access      public
 * @since       1.0 
 * @return      void
*/
remove_action( 'welcome_panel', 'wp_welcome_panel' );

Our Custom Welcome Message

If you go now to your dashboard (don’t forget to activate the plugin!), you will no longer see any welcome screen – yay!. So now we can create our own custom function and hook it into the welcome_panel hook so it displays ours instead. This part is the simple, all you need to do is create a custom function and add the content you want for the welcome panel. In my example I started from the default content, from the wp_welcome_panel() default function. It’s easier just because it allows me to use already formatted content. So I just copied and pasted this function (find it under wp-admin/includes/dashboard.php) then edited it.

Here is what my function looks like (notice how the function is followed by add_action and hooked into welcome_panel).

/**
 * Custom welcome panel function
 *
 * @access      public
 * @since       1.0 
 * @return      void
 */
function wpex_wp_welcome_panel() { ?>

	<div class="custom-welcome-panel-content">
		<h3><?php _e( 'Welcome to your custom dashboard Message!' ); ?></h3>
		<p class="about-description"><?php _e( 'Here you can place your custom text, give your customers instructions, place an ad or your contact information.' ); ?></p>
		<div class="welcome-panel-column-container">
			<div class="welcome-panel-column">
				<h4><?php _e( "Let's Get Started" ); ?></h4>
				<a class="button button-primary button-hero load-customize hide-if-no-customize" href="http://your-website.com"><?php _e( 'Call me maybe !' ); ?></a>
					<p class="hide-if-no-customize"><?php printf( __( 'or, <a href="%s">edit your site settings</a>' ), admin_url( 'options-general.php' ) ); ?></p>
			</div><!-- .welcome-panel-column -->
			<div class="welcome-panel-column">
				<h4><?php _e( 'Next Steps' ); ?></h4>
				<ul>
				<?php if ( 'page' == get_option( 'show_on_front' ) && ! get_option( 'page_for_posts' ) ) : ?>
					<li><?php printf( '<a href="%s" class="welcome-icon welcome-edit-page">' . __( 'Edit your front page' ) . '</a>', get_edit_post_link( get_option( 'page_on_front' ) ) ); ?></li>
					<li><?php printf( '<a href="%s" class="welcome-icon welcome-add-page">' . __( 'Add additional pages' ) . '</a>', admin_url( 'post-new.php?post_type=page' ) ); ?></li>
				<?php elseif ( 'page' == get_option( 'show_on_front' ) ) : ?>
					<li><?php printf( '<a href="%s" class="welcome-icon welcome-edit-page">' . __( 'Edit your front page' ) . '</a>', get_edit_post_link( get_option( 'page_on_front' ) ) ); ?></li>
					<li><?php printf( '<a href="%s" class="welcome-icon welcome-add-page">' . __( 'Add additional pages' ) . '</a>', admin_url( 'post-new.php?post_type=page' ) ); ?></li>
					<li><?php printf( '<a href="%s" class="welcome-icon welcome-write-blog">' . __( 'Add a blog post' ) . '</a>', admin_url( 'post-new.php' ) ); ?></li>
				<?php else : ?>
					<li><?php printf( '<a href="%s" class="welcome-icon welcome-write-blog">' . __( 'Write your first blog post' ) . '</a>', admin_url( 'post-new.php' ) ); ?></li>
					<li><?php printf( '<a href="%s" class="welcome-icon welcome-add-page">' . __( 'Add an About page' ) . '</a>', admin_url( 'post-new.php?post_type=page' ) ); ?></li>
				<?php endif; ?>
					<li><?php printf( '<a href="%s" class="welcome-icon welcome-view-site">' . __( 'View your site' ) . '</a>', home_url( '/' ) ); ?></li>
				</ul>
			</div><!-- .welcome-panel-column -->
			<div class="welcome-panel-column welcome-panel-last">
				<h4><?php _e( 'More Actions' ); ?></h4>
				<ul>
					<li><?php printf( '<div class="welcome-icon welcome-widgets-menus">' . __( 'Manage <a href="%1$s">widgets</a> or <a href="%2$s">menus</a>' ) . '</div>', admin_url( 'widgets.php' ), admin_url( 'nav-menus.php' ) ); ?></li>
					<li><?php printf( '<a href="%s" class="welcome-icon welcome-comments">' . __( 'Turn comments on or off' ) . '</a>', admin_url( 'options-discussion.php' ) ); ?></li>
					<li><?php printf( '<a href="%s" class="welcome-icon welcome-learn-more">' . __( 'Learn more about getting started' ) . '</a>', __( 'http://codex.wordpress.org/First_Steps_With_WordPress' ) ); ?></li>
				</ul>
			</div><!-- .welcome-panel-column welcome-panel-last -->
		</div><!-- .welcome-panel-column-container -->
	<div><!-- .custom-welcome-panel-content -->

<?php }
add_action( 'welcome_panel', 'wpex_wp_welcome_panel' );

You can simply edit this part of the code to create your content, add links, images, forms or whatever…

The Final Plugin Code

Here is the full plugin code, enjoy!

<?php
/*
Plugin Name: Custom Dahsboard Message
Plugin URL: https://www.wpexplorer.com/
Description: A little plugin to modify default dashboard welcome message
Version: 0.1
Author: WExplorer
Author URI: https://www.wpexplorer.com/
*/

/**
 * Remove the default welcome dashboard message
 *
 */
remove_action( 'welcome_panel', 'wp_welcome_panel' );

/**
 * Custom welcome panel function
 *
 * @access      public
 * @since       1.0 
 * @return      void
 */
function wpex_wp_welcome_panel() { ?>

	<div class="custom-welcome-panel-content">
		<h3><?php _e( 'Welcome to your custom dashboard Message!' ); ?></h3>
		<p class="about-description"><?php _e( 'Here you can place your custom text, give your customers instructions, place an ad or your contact information.' ); ?></p>
		<div class="welcome-panel-column-container">
			<div class="welcome-panel-column">
				<h4><?php _e( "Let's Get Started" ); ?></h4>
				<a class="button button-primary button-hero load-customize hide-if-no-customize" href="http://your-website.com"><?php _e( 'Call me maybe !' ); ?></a>
					<p class="hide-if-no-customize"><?php printf( __( 'or, <a href="%s">edit your site settings</a>' ), admin_url( 'options-general.php' ) ); ?></p>
			</div><!-- .welcome-panel-column -->
			<div class="welcome-panel-column">
				<h4><?php _e( 'Next Steps' ); ?></h4>
				<ul>
				<?php if ( 'page' == get_option( 'show_on_front' ) && ! get_option( 'page_for_posts' ) ) : ?>
					<li><?php printf( '<a href="%s" class="welcome-icon welcome-edit-page">' . __( 'Edit your front page' ) . '</a>', get_edit_post_link( get_option( 'page_on_front' ) ) ); ?></li>
					<li><?php printf( '<a href="%s" class="welcome-icon welcome-add-page">' . __( 'Add additional pages' ) . '</a>', admin_url( 'post-new.php?post_type=page' ) ); ?></li>
				<?php elseif ( 'page' == get_option( 'show_on_front' ) ) : ?>
					<li><?php printf( '<a href="%s" class="welcome-icon welcome-edit-page">' . __( 'Edit your front page' ) . '</a>', get_edit_post_link( get_option( 'page_on_front' ) ) ); ?></li>
					<li><?php printf( '<a href="%s" class="welcome-icon welcome-add-page">' . __( 'Add additional pages' ) . '</a>', admin_url( 'post-new.php?post_type=page' ) ); ?></li>
					<li><?php printf( '<a href="%s" class="welcome-icon welcome-write-blog">' . __( 'Add a blog post' ) . '</a>', admin_url( 'post-new.php' ) ); ?></li>
				<?php else : ?>
					<li><?php printf( '<a href="%s" class="welcome-icon welcome-write-blog">' . __( 'Write your first blog post' ) . '</a>', admin_url( 'post-new.php' ) ); ?></li>
					<li><?php printf( '<a href="%s" class="welcome-icon welcome-add-page">' . __( 'Add an About page' ) . '</a>', admin_url( 'post-new.php?post_type=page' ) ); ?></li>
				<?php endif; ?>
					<li><?php printf( '<a href="%s" class="welcome-icon welcome-view-site">' . __( 'View your site' ) . '</a>', home_url( '/' ) ); ?></li>
				</ul>
			</div><!-- .welcome-panel-column -->
			<div class="welcome-panel-column welcome-panel-last">
				<h4><?php _e( 'More Actions' ); ?></h4>
				<ul>
					<li><?php printf( '<div class="welcome-icon welcome-widgets-menus">' . __( 'Manage <a href="%1$s">widgets</a> or <a href="%2$s">menus</a>' ) . '</div>', admin_url( 'widgets.php' ), admin_url( 'nav-menus.php' ) ); ?></li>
					<li><?php printf( '<a href="%s" class="welcome-icon welcome-comments">' . __( 'Turn comments on or off' ) . '</a>', admin_url( 'options-discussion.php' ) ); ?></li>
					<li><?php printf( '<a href="%s" class="welcome-icon welcome-learn-more">' . __( 'Learn more about getting started' ) . '</a>', __( 'http://codex.wordpress.org/First_Steps_With_WordPress' ) ); ?></li>
				</ul>
			</div><!-- .welcome-panel-column welcome-panel-last -->
		</div><!-- .welcome-panel-column-container -->
	<div><!-- .custom-welcome-panel-content -->

<?php }
add_action( 'welcome_panel', 'wpex_wp_welcome_panel' );
45 Comments
  1. Deshwal · 12 years ago

    Good job.. very useful plugin

  2. amdhas · 12 years ago

    I think for personal web or blog you don’t need do that.

    This method good for multiple user or multi author who have user role to see that welcome message zone.

    • Robert · 12 years ago

      I agree, amdhas

      but it is really useful for community blogs 🙂 with multi authors

  3. Nancy · 12 years ago

    Woooooowww I just love this plugin! This was exactly what I needed at the right time 😀

    One question. Is it possible to always show the welcome panel? So that the “dismiss button” will be hided, and people will see this panel every time they login.

    Would be great!

    Thanks in advance!

    • Remi · 12 years ago

      Thanks! Yes you can hide with CSS or simply delete the code that shows the message!

  4. flippertie . · 12 years ago

    Nice – also worked as a tutorial for creating my first plugin! Now on to more complex ones….

  5. Claire · 12 years ago

    I’m sorry, but can it be, that this plugin isn’t working in WP 3.5? Or is it me that’s doing something completely wrong? 🙂

    • Remi · 12 years ago

      Hi Claire, i’v tested with WP 3.5 and no problem. What kind of issue do you have ?

  6. Allen Tullett · 12 years ago

    Excellent, thank you for this. This is a fantastic tool to personalise WordPress even further for clients without having to rely on third party plugins.
    Keep up the good work!

  7. unsalkorkmaz · 12 years ago

    You could use
    remove_action( ‘welcome_panel’, ‘wp_welcome_panel’ );

    why jquery?

    • Remi · 12 years ago

      If you do so, you remove completely the welcome panel.

  8. Alex Phelps · 12 years ago

    Great tutorial.

    How can I force this to display for all user roles?

    I want this to show for Contributors on my site so they get the custom message.

  9. Ali · 12 years ago

    Good job….but I have a question: how can I hide the “dismiss button” ????? Where can I find the code?

    • Hugo · 12 years ago

      Hi Ali, i used it like this at the beggining of the function:

      function rc_my_welcome_panel()
      {?>

      a.welcome-panel-close {display:none}
      p.welcome-panel-dismiss {display:none}

  10. leejacksondev · 12 years ago

    Hi,

    Instead of jquery I used:

    div.welcome-panel-content { display:none; }

    This stops the WordPress welcome appearing for a second or two during page load.

    Thanks for sharing this great plugin.

    Lee

    • edhurtig · 11 years ago

      Same Here. CSS worked much better. Great plugin!

  11. Dulitel MisterWebmaker · 12 years ago

    thanks veeeery much for all your post!
    Very useful!!

  12. David - @turtlepod · 12 years ago

    i would say using jquery is the wrong way of doing it, well, maybe not. it’s just personal taste in coding. i would just remove the default wordpress action to welcome panel:

    remove_action( ‘welcome_panel’, ‘wp_welcome_panel’ );

    • Remi · 12 years ago

      hi David, i agree, it’s not the ideal solution, it’s A solution, but yes there are better ways to do it.

    • brycead · 10 years ago

      Yes, this is much better than Remi’s jquery way. @remi.. do you even wordpress?

  13. markerpeter · 12 years ago

    awesome plugin. you are great dude…

    • Remi · 12 years ago

      Thanks !

  14. Shaq · 12 years ago

    hi remi

    good job.
    i missing only one thing:
    How can I show this for other user roles like “author”?

    bye

  15. OAC Designs · 11 years ago

    excellent stuff, thanks so much for this!

  16. développement site internet · 11 years ago

    yup, sinon, pour ta première partie, suffit de ça pour supprimer le Welcome default widget:

    remove_action( ‘welcome_panel’, ‘wp_welcome_panel’ );

    pour les autres widgets:

    function remove_dashboard_widgets() {
    global $wp_meta_boxes;

    unset($wp_meta_boxes[‘dashboard’][‘side’][‘core’][‘dashboard_quick_press’]);
    unset($wp_meta_boxes[‘dashboard’][‘normal’][‘core’][‘dashboard_incoming_links’]);
    unset($wp_meta_boxes[‘dashboard’][‘normal’][‘core’][‘dashboard_right_now’]);
    unset($wp_meta_boxes[‘dashboard’][‘normal’][‘core’][‘dashboard_plugins’]);
    unset($wp_meta_boxes[‘dashboard’][‘normal’][‘core’][‘dashboard_recent_drafts’]);
    unset($wp_meta_boxes[‘dashboard’][‘normal’][‘core’][‘dashboard_recent_comments’]);
    unset($wp_meta_boxes[‘dashboard’][‘side’][‘core’][‘dashboard_primary’]);
    unset($wp_meta_boxes[‘dashboard’][‘side’][‘core’][‘dashboard_secondary’]);

    }

    add_action(‘wp_dashboard_setup’, ‘remove_dashboard_widgets’ );

  17. davise · 11 years ago

    hi,
    in WP 3.8 the content goes to 2 column than the one column row.

    I want exactly like the picture you showed, but its goes to 2 column layout.
    let me know if any solution.

    thanks

  18. phalancs · 11 years ago

    Strange, I clicked on dismiss, and now the message is gone forever. How to get it back
    And second. How to show it to other user roles such as authors as well? Still no hint..

    • Alex · 7 years ago

      I had this same problem. Is there a solution to get it “un-dismiss”? Also is there a way to make it non-dismissable?

      • AJ Clarke · 7 years ago

        If you look at wp-admin/index.php you can see the dismiss button is added manually and there is no way to remove it via any filter (only possible via CSS or JS). Depending what you want to do you may want to just remove the welcome panel completely (see the updated post above in the second snippet) and then add custom content via javascript under the h1 title. I don’t believe there is any hook you can use to place custom text here, unless it’s possible to override or extend the wp_dashboard() function, but doing a quick look in the WP files I didn’t see any way.

  19. Eirik · 11 years ago

    How to show this for all users?

    • AJ Clarke · 11 years ago

      Maybe try something like this:

      function rc_my_welcome_init() {
      global $wpdb;
      $wpdb->update($wpdb->usermeta,array('meta_value'=>1),array('meta_key'=>'show_welcome_panel'));
      }
      add_action('after_switch_theme','rc_my_welcome_init');
      
  20. Barnaby Brachamul · 11 years ago

    Hello,

    The plugin does not seem to work for me. It shows up under plugins, and I was able to activate it, but nothing new shows up on the dashboard.
    Any idea how to troubleshoot? I am a php noob.

    (You should make this into an easily-installed customizable plugin, by the way)

  21. Devesh · 11 years ago

    Hi, I have tried this but getting some error Parse error: syntax error, unexpected ‘<' in /home/content/70/11631170/html/wp-content/plugins/custom-dashboard-message-remi/dashboard.php on line 24
    please reply. Thanks

    • AJ Clarke · 11 years ago

      What line of code is line 24 for you so I can compare the code and see what the issue is, thanks!

  22. Jason · 10 years ago

    Fantastic! just what I was looking for.

  23. johnybravo · 10 years ago

    hi there, why ‘Call me maybe’ doesn’t work by clicking… it works with r.mouse.btt->open in new.. ??

  24. johnybravo · 10 years ago

    it is!!, is working fine -my fault, sorry , please delete previous posts awaiting…
    good job, thx

  25. chiranjit · 9 years ago

    Great job, simple,efficient.

  26. Mwiinga · 8 years ago

    Amazing. 🙂
    I just created this plugin, and boom! works out fine.
    but, I have a challenge.
    I want the ‘dismiss button’ completely out.
    How do I remove this?
    I’ve searched and searched but, I cant seem to find this little button..
    Thanks..

    • AJ Clarke · 8 years ago

      You should be able to simply hide it via javascript using the same method to hide the default welcome box but targeting the dismiss button 😉

  27. KenEastwood · 8 years ago

    I too would like to hide that pesky dismiss message. Tried all sorts, including using javascript and CSS. Any tried and tested methods that work?

  28. jockebq · 7 years ago

    I just tried this on my site. But I have an issue where this takes over the whole Dashboard. And I am not able to dismiss it either. Is it possible to set the size of this widget, so that other widgets fit too?

    Thank you!

    • AJ Clarke · 6 years ago

      This is supposed to take over the whole dashboard. If all you want to do instead is add a new dashboard widget that’ even easier. Have a look at the Dashboard Widgets API on the WordPress repository.

  29. Adamu Malte · 6 years ago

    Hello Bro, thanks for your Good Job, please provide download link of this plugin.
    I mean please compress the plugin to .zip file and drop download link for wp beginners and newbies. Thank you!!!

    • Kyla · 6 years ago

      Just create a new folder under wp-content/plugins, call it custom-dashboard-message (or something else if you’d like) and copy/paste the section under “final plugin code” 🙂

Leave a Reply

Your email address will not be published. Required fields are marked *

Learn how your comment data is processed by viewing our privacy policy here.