Skip Navigation

[Resolved] how to remove “fields and views” button above post edit for non admin users

This thread is resolved. Here is a description of the problem and solution.

Problem:

Remove the "fields and views" button in the content editor.

Solution:

please try the built-in filter hook toolset_editor_add_form_buttons, like this:

https://toolset.com/forums/topic/how-to-remove-fields-and-views-button-above-post-edit-for-non-admin-users-2/#post-1091024

Relevant Documentation:

This support ticket is created 6 years, 5 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 2 replies, has 2 voices.

Last updated by MOHO 6 years, 5 months ago.

Assisted by: Luo Yang.

Author
Posts
#1090277
2018-08-23_225526.jpg
2018-08-23_225444.jpg
2018-08-23_225430.jpg

how to remove "fields and views" button above post edit for non admin users
https://toolset.com/forums/topic/how-to-remove-fields-and-views-button-above-post-edit-for-non-admin-users/

I use "woocommerce frontend manager" plugin, so some fields display "Types", i follow your post, try to hide... but "Types" still display.

#1091024

Hello,

The thread you mentioned above is outdated, please try the built-in filter hook toolset_editor_add_form_buttons, like this:
Add below codes in your theme file "functions.php":

function tssupp_remove_toolset_buttons(){
  
    if ( ! current_user_can( 'update_core' ) ) {
        // remove the Fields and Views button
        add_filter( 'toolset_editor_add_form_buttons', '__return_false' );
    }
}
add_action( 'init', 'tssupp_remove_toolset_buttons' );
#1091078

Thanks for your great support!