Skip Navigation

[Resolved] Programatically remove Front End Display

This support ticket is created 7 years, 11 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
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10: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/Kolkata (GMT+05:30)

This topic contains 1 reply, has 2 voices.

Last updated by Minesh 7 years, 11 months ago.

Assisted by: Minesh.

Author
Posts
#393885

Ben
Screen Shot 2016-04-30 at 12.49.04.png

I am trying to:
Programmatically (or with a setting I've not discovered) remove the, "Front-End Display" meta box for lower level users.

Background:
I have a workflow for my editors and contributors has them filling out fields in CPTs that I have created, and these CPTs have various relationships to each other. The front end views for these CPTs and their relationships already established in the theme.

In the last updates of Toolset, I see we now have a Front-End Editor Metta box. I've not had a chance to work with this tool yet, but this new metabox has really has confused my team. In my context I can't imagine editors needing to construct front end views, so it's inappropriate for them to have access to this functionality.

I know I can simply hide the meta box under "Screen Options" however I've also disabled Screen Options on these pages, as I didn't want users hiding important workflow features, as this would be a support nightmare.

So I have two Requests:
1) What is the ID of the "Front-End Display" metabox. With this I should be able to remove it programmatically using:

remove_meta_box( $id, $page, $context ); 

https://codex.wordpress.org/Function_Reference/remove_meta_box

2) Is there a setting that I've not yet found that removes this meta box for users below a particular role? If not, then I'd like to add this as a feature request. I believe that this is a fairly common use case, where we just want editors or authors fill in the fields, without any front end views creation.

#394089

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

To hide Front-end Display box you should add following filter to your current theme's functions.php file.

add_filter('types_information_table', '__return_false');

You may manage show/hide and display it conditionally based on user role.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.