Skip Navigation

[Resolved] Remove "edit view" for Editors in frontend

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.

This topic contains 3 replies, has 2 voices.

Last updated by Caridad 7 years, 7 months ago.

Assigned support staff: Caridad.

Author
Posts
#192190

Hello,
I don't want editors being able to edit a view. How can I remove all the links to the "edit view" in frontend and backend?
Thank you.

#192216

Dear Francesco,

You can add this line to functions.php in your theme:

add_filter('wpv_edit_view_link', '__return_false');

Please let me know if you are satisfied with my answer and if I can help you with any other questions you might have.

Regards,
Caridad

#192584

It works, thank you!

#192627

Dear Francesco

I just noticed you said for editors. Then it would be like this:

if ( !current_user_can( 'manage_options' ) ) {
  add_filter('wpv_edit_view_link', '__return_false');
}

Regards,
Caridad