Remove "Press This" from the Writing Settings page

Hello. I would like to remove the Press This section of the Writing Settings from my sites. I am running a subscription based multisite, and my customers have no need of this.

I have already removed Press This from Tools Menu with a little bit of code. I would like to do the same for Writing Settings page. Thanks in advance.

  • Vinod Dalvi
    • WP Unicorn

    Hi @ghmaster,

    Thank you for your question.

    You can just hide the Press This section of the Writing Settings by adding the following CSS code in the admin area of your site using plugin like http://wordpress.org/plugins/add-admin-css

    .wp-admin.options-writing-php form * {
    display: none;
    }
    
    .wp-admin.options-writing-php form p.submit,
    .wp-admin.options-writing-php form #submit,
    .wp-admin.options-writing-php form .form-table,
    .wp-admin.options-writing-php form .form-table tr {
    display: block !important;
    }
    
    .wp-admin.options-writing-php form .form-table * {
    display: inline-block;
    }

    Kind Regards,
    Vinod Dalvi

  • ghmaster
    • Design Lord, Child of Thor

    Hello, couple of comments on your solution...

    First, I would prefer if it was possible to use hooks/filters instead of css.

    Second, I should have mentioned this in the original...but I am running a multisite, so the admin css plugin cannot be visible, accessible, or useable to the lower level site admins. Also, I need a way to specify the hide Press This css code as a super admin and have it affect the sites below it. In other words, as the super admin, I am removing this feature from my multisite.

    Currently, in the solution above, if I network activate the Add Admin Css plugin it makes it so each subsite admin can write their own admin css code for their site. My css code as super admin does not 'trickle' down to the lower sites. Any help would be greatly appreciated.

    In addition I had another topic regarding domain mapping here:

    https://premium.wpmudev.org/forums/topic/domain-mappingpurchasing-proceedure#post-637939

    I wanted to know if the plugin author had a chance to take a look at this as well. Thanks again.

  • pumpkinslayer
    • Site Builder, Child of Zeus

    From here: http://wp-snippets.com/hide-admin-help-tab/

    There is a filter to remove them.

    add_filter('contextual_help_list','contextual_help_list_remove');
    function contextual_help_list_remove() {
        global $current_screen;
        $current_screen->remove_help_tab( 'options-press' );
    }

    This should do the trick, although I have not tested it.

    There is more on this here: https://codex.wordpress.org/Class_Reference/WP_Screen

    EDIT: this only removes the help tab, still looking to see if there's a way

  • Vinod Dalvi
    • WP Unicorn

    Hi @ghmaster,

    First, I would prefer if it was possible to use hooks/filters instead of css.

    I didn't find any hook to achieve it.

    My css code as super admin does not 'trickle' down to the lower sites. Any help would be greatly appreciated.

    You can use CSS module from our Ultimate Branding plugin or if you don't want to use separate different plugin to add CSS then then you can achieve this by adding the attached php file in the this path wo-content/mu-plugnis in your WordPress install.

    In addition I had another topic regarding domain mapping here:

    https://premium.wpmudev.org/forums/topic/domain-mappingpurchasing-proceedure#post-637939

    I have again notified the plugin developer to reply on that thread.

    Best Regards,
    Vinod Dalvi

  • ghmaster
    • Design Lord, Child of Thor

    Hello, I realized I didn't mention it earlier but the css code above has the effect of hiding the contents of the whole Writing menu page. I only want to hide/eliminate the section related to "Press This". The other parts should remain intact.

    Also...@pumpkinslayer
    Thanks for this, using the Ultimate Branding plugin does allow the CSS to 'flow down' to the subsites.

    Any ideas on only hiding/eliminating the "Press This" section would be appreciated. Thanks again.

  • pumpkinslayer
    • Site Builder, Child of Zeus

    Add this CSS. It will hide the Press This elements from the page.

    .options-writing-php .pressthis,
    .options-writing-php .title,
    .options-writing-php #wpbody form p:nth-child(7),
    .options-writing-php #wpbody form p:nth-child(8),
    .options-writing-php #wpbody form p:nth-child(9) {
    	visibility: hidden;
    	margin: 0;
    	height: 0;
    	padding: 0;
    }

    Unfortunately there are no specific classes or IDs for the specific elements. So this will likely break if this core file is ever changed.

    I've checked this on desktop Chrome and it hid all the bits fine.

  • ghmaster
    • Design Lord, Child of Thor

    Hello Vinod,
    Thanks for all the help. I think it's almost there...Press this is hidden, but need to still allow users to edit and save the other Writing settings. The button to save appears to be hidden as well...any way to display the button?

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.