• Hi I’m needing help with adding a custom option to my “link to” drop down in my core/gallery block settings. Currently there are the standard options of “None”, “Media File” and “Attachment Page” but I would like to add an option of “Light Box”. I can’t find any instruction to do this. I would also need to add the functionality in my functions.php. I am able to change the output of the gallery HTML so that the light box works so that bit is done. I just need to add the option in my gallery settings and only deploy the right version of the HTML if the user selects that option. Thanks.

    • This topic was modified 4 years, 3 months ago by cannon303.
Viewing 4 replies - 1 through 4 (of 4 total)
  • There are several lightbox plugins that don’t need an extra indicator on the image. They work on any link to an image file. That means you can choose Link to File, and that’s it. The lightbox plugin does the rest. This is better than putting code in your theme, since you can change themes at any time and it still works.

    Thread Starter cannon303

    (@cannon303)

    Thanks but in this case I don’t want a plugin. It’s practically all built. I just need that little bit of functionality to get it working.

    • This reply was modified 4 years, 3 months ago by cannon303.

    The point I was making was that acting on any linked image makes it work for all content, classic or block, instead of only the one that is chosen in the block settings. You shouldn’t have to edit each post to get it.
    So, trying to add something in the editor is a very limited approach.

    Thread Starter cannon303

    (@cannon303)

    I’m sorry I don’t understand what that means Joy but not to worry. I really do need that functionality. Thanks.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Adding an option to the Gallery settings’ is closed to new replies.