Domain Mapping how hide exclude Pages

The new domain mapping version has this "Exclude Pages" option.
http://gyazo.com/c3c71b52d1ea59dfced66b1f77678e9b
This leads to terrible confusion for new users.
How can I hide this option from the user?

Thanks
Peter

  • Ash
    • WordPress Hacker

    Hello @Peter

    I hope you are well today and thanks for asking the question.

    Please try to use this code:

    add_action( 'admin_head', 'hide_options' );
    function hide_options() {
        ?>
        <style>
            div.tablenav, .excludedpage, .tablenav, #dm_save_excluded_pages_form{
                display: none
            }
        </style>
        <?php
    }

    You can add those codes in your functions.php in the theme, if you think your theme won’t be changed. Otherwise mu-plugins is the best solution. To use mu-plugins, go to /wp-content/ and find the folder with name 'mu-plugins'. If there is no folder in that name, then create a folder, name it 'mu-plugins', create a file inside that, give any name you like and paste the code in there. You don't need to activate that plugin. Mu-plugins means must use plugins, so it will be activated automatically always. If you use mu-plugins then add a php start tag at the beginning of the code.

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

    Cheers
    Ash

  • Ash
    • WordPress Hacker

    Hello @Peter

    I hope you are well today.

    Please try the following:

    add_action( 'admin_head', 'hide_options' );
    function hide_options() {
        ?>
        <style>
            div.tablenav, .excludedpages, .tablenav, #dm_save_excluded_pages_form{
                display: none
            }
        </style>
        <?php
    }

    If it still doesn't work, would you please grant support access from your Dashboard > WPMU DEV > Support > Support Access so that I can check?

    https://premium.wpmudev.org/manuals/wpmu-dev-dashboard-enabling-staff-login/

    I will be happy to take a look :slight_smile:

    Cheers
    Ash

  • Peter
    • Site Builder, Child of Zeus

    Hi Ash,
    Your code :
    add_action( 'admin_head', 'hide_options' );
    function hide_options() {
    ?>
    <style>
    div.tablenav, .excludedpages, .tablenav, #dm_save_excluded_pages_form{
    display: none
    }
    </style>
    <?php
    }

    does disable not only disable the form but also all the filters in backend and pagination on other plugin windows like maste. slider etc.
    http://gyazo.com/8a82d4c6398f0de67b273e5a354aeae0
    As soon I delete this the code in functions.php everything is back to normal.
    You have access to backend now, but not to my hidden function.php
    Please test this code on your own test site and you will see that this code is no good.
    Thanks
    Peter

  • calvinrogercanas
    • New Recruit

    Hey there @Peter,

    Hope you're well! :slight_smile:

    If you want to remove the whole option for exclude page/s. Get the code here: http://pastebin.com/yaKJuneT then replace all the content of Map.php you can find in /public_html/wp-content/plugin/domain-mapping/classes/Domainmap/Render/Site

    Just be aware that updating the plugin will lose the modification.

    Let me know if it helps! :slight_smile:

    Best Regards,
    Calvin

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.