Made in Europe, buy from Europe.

Black Friday

65% off Annual plans

25% off Lifetime · 10 per week

Ends December 2

Get the deal →

How to remove the Edit Gallery link on the front end

Updated 2 min read

After you create a gallery and add it to your page, you may notice an Edit Gallery link under the gallery. You can remove the Edit Gallery link with a filter.

Watch the Edit gallery link on the front end, and the same page once the filter removes it.
A Modula gallery on a page with the Edit gallery link marked under the images

The filter that removes the link

The front end is the part of your site that visitors see. To remove the Edit Gallery link there, you use the modula_troubleshooting_disable_edit filter. A filter is a small piece of code that changes how a plugin works.

You can turn on this filter to remove the link. The filter settings are:

  • Filter Name: modula_troubleshooting_disable_edit
  • Default Value: FALSE
  • Usage: Turn on this filter if you want to remove the Edit Gallery link.

Example code to remove the Edit Gallery link

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

PHP
add_filter( 'modula_troubleshooting_disable_edit', '__return_true' );

Once you save the file, the Edit Gallery link no longer shows on the front end.

What the code changes

The modula_troubleshooting_disable_edit filter is off by default, so the link shows until you add the code. With the code snippet on your site, the link stays hidden.

You can use other filters like this one to change how Modula behaves. See Modula Troubleshooting Filters.

Was this page helpful?
0 0

Still stuck?

Can’t find the answer?

Write to us with what you tried and what you expected to happen, and we’ll help you sort it out.