How to remove the ‘Edit Gallery’ link on the front end?

After you create a gallery and add it to your page you may notice under your gallery that there is displayed an ‘Edit Gallery‘ link.

If you want to remove the “Edit Gallery” link from the front end of your Modula galleries, you can now do so using a simple filter: modula_troubleshooting_disable_edit

You can enable a filter to remove the “Edit Gallery” link. The filter settings are:

  • Filter Name: modula_troubleshooting_disable_edit
  • Default Value: FALSE
  • Usage: If you want to remove the “Edit Gallery” link, you need to enable this filter.

Example Implementation

To remove the “Edit Gallery” link, add the following code snippet to your theme’s functions.php file:

add_filter( 'modula_troubleshooting_disable_edit', '__return_true' );

This will ensure that the “Edit Gallery” link is no longer displayed on the front end.

Summary

By enabling the modula_troubleshooting_disable_edit filter, you can easily remove the “Edit Gallery” link from your Modula galleries. Simply add the provided code snippet to your site, and the link will be hidden.

Was this article helpful?
0 Yes 0 No