Hide Genesis framework upgraded notice from non Super Admin

I have a multisite installation using Pro Sites and running the Genesis framework, with the individual sites using child themes.
I have a must use plugin set up to direct admins & other users of the individual sites to their dashboard when they log in so they can see a custom welcome message. That is working well except after I upgrade the Genesis framework. When they log for the first time after an upgrade to Genesis they see the "Welcome to Genesis" genesis upgraded page. I want to hide that page from all except Super Admins.
I have tried doing this with the following must use plugin, but it doesn't work:
<?php

function hide_genesis_updated() {
if ( !is_super_admin() ) { ?>
<style type="text/css">
page=genesis-upgraded {
display: none;
}
</style>
<?php }
}
add_action('network_admin_notices', 'hide_admin_page_genesis-upgraded' );

Any corrections to the above, or alternative solutions would be much appreciated!

  • Nithin
    • Support Wizard

    Hi Debbie,

    Hope you are doing good today. :slight_smile:

    add_action('admin_head', 'hide_admin_page_genesis-upgraded' );
    The hook should be admin_head, but I'm not sure about page=genesis-upgraded element mentioned in the code, I could only tell you better, if I could check your website. Could you please enable support access so that we could give a closer look. You can grant access from WPMU DEV > Support > Support Access > Grant Access or see this manual.
    http://premium.wpmudev.org/manuals/wpmu-dev-dashboard-enabling-staff-login/

    Please let us know once you enable access, so that we could help get this sorted asap. Have a nice weekend. :slight_smile:

    Kind Regards,
    Nithin

  • Ash
    • WordPress Hacker

    Hello Debbie

    Please try the following code as mu-plugin:

    add_action( 'admin_head', function() {
        ?>
        <style>
            .admin_page_genesis-upgraded .wrap{
                display: none !important;
            }
        </style>
        <?php
    } );

    Hope it helps :slight_smile: Please feel free to ask more question if you have any.

    Cheers
    Ash

  • Debbie
    • Webb Weaver

    Hello Ash,

    Thank you for this. I changed the code to what you provided.
    However I've run into a new problem:
    When I try to register a new site with the free trial link at the bottom of the page, after I click the Reserve Your Site button, the username & url are not displaying. They used to display so I'm not sure what is causing them not to display.
    When I open the network in another browser I can see that the site & user has been created. So I go back to the other browser that I registered a new site in & refresh it, I see that I'm logged in, but there's no links to go to the dashboard.
    Please go to this page http://webbweavers.website/register/ & register a free trial with the link at the bottom of the page so you can see what is happening.

    I tried deleting the genesis mu plugin but that does not solve the problem.

    I hadn't made any changes to the Pro Sites settings, and looking through them I'm not see what could be causing this.

    I appreciate your help!
    Debbie

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.