Skip Navigation

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

This support ticket is created 9 years, 10 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 – 19:00 10:00 – 19:00 10:00 – 19:00 10:00 – 19:00 10:00 – 19:00 -
- - - - - - -

Supporter timezone: Europe/Madrid (GMT+01:00)

This topic contains 3 replies, has 2 voices.

Last updated by Caridad 9 years, 10 months ago.

Assisted by: 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

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