Support » Requests and Feedback » Admin Hook for Welcome Screen / Dashboard

  • Would it be possible in future version of WordPress to include a hook on the dashboard either before or after the welcome message, so that we can create our own welcome messages, or useful information for clients who we use wordpress for. At the moment we are using dashboard widgets for this, but it doesn’t give as much freedom over the design.

    I’ve done it to my own WordPress test site, but obviously I had to edit a core file (which was ok for my test site, because well its a test site), but no-body should edit core files on live sites. EVER!

    Just something simple so we can do:

    add_action( 'admin_welcome_before', 'custom_function_to_call' );

    🙂 Thanks for making the most awesome CMS ever!

Viewing 5 replies - 1 through 5 (of 5 total)
  • Moderator Ipstenu (Mika Epstein)


    🏳️‍🌈 Halfelf Rogue & Plugin Review Team Rep

    Why not admin_head?

    Or look at how Hello Dolly does it.

    admin_head is called inside the <head> tag, and is for stylesheets and misc stuff that belongs in the <head> of the site (similar to wp_head on the front end).

    Hello dolly hooks to the admin notices, which are called before the content, so the “custom welcome message” will be displayed above the page title.

    It’s possible to hook it to the notices, and then use css to move everything around, but its an ugly method. 🙂

    To add to Crgeary post. I simply used the “admin_notices” hook and called my new function. Then i used css to float the welcome panel to the left and all was fixed. Here is my code

    To view all hooks on a page checkout:

    To view hooks db:

    To view wordpress source code checkout:
    Replace all of the div content in the welcome screen below with your content.

    [ 96 lines of code moderated. For more than 10 lines of code please use instead. ]

    DONT FORGET TO THEN ADD CSS: float:left on the .welcome-panel div and then all should be fixed.

    “admin_notices” is a really great hook. That was exactly what I needed. Thanks kreynol7.

    Use this to hide the welcome message:

    add_action('load-index.php', 'hide_welcome_message_panel');
    	function hide_welcome_message_panel() {
    		$user_id = get_current_user_id();
    		update_user_meta( $user_id, 'show_welcome_panel', 0 );

    I’d like to evaluate this also (not sure if I’ll like it, or not), but the code was removed from the post above… anyone care to pastebin or similar how you did this?

    In my case I’d like to tie it to a plugin setting (applies to all users) rather than a user meta – show only until it has been dismissed, no matter who dismissed it. But I can probably sort that bit out myself given the above.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Admin Hook for Welcome Screen / Dashboard’ is closed to new replies.