• Resolved gravnetic

    (@gravnetic)


    I am curious if there is an option that I can add through find and replace or a filter which would allow me to apply the lightbox on all single images and galleries which are already linking to media. The site has hundreds of posts currently.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Johannes Kinast

    (@goaroundagain)

    Hi @gravnetic,

    Sadly thats not possible because baguetteBox.js needs a <a> tag around the image (see https://github.com/feimosi/baguetteBox.js#usage) and this is missing if Link to is not set to media.

    Hi Johannes,

    First, congratulations on the amazing work with this plugin. Second, related to the OP question, I would like to know if adding the add_filter(‘option_image_default_link_type’, fn () => ‘file’); snipped to wp-includes/functions.php will set the “Link to” to “Media File” retroactively (for all existing posts).

    Thank you!

    Plugin Author Johannes Kinast

    (@goaroundagain)

    Hi @nestormarius,

    unfortunately, no. The HTML structure is saved in the database for every block, and it’s not possible to change this by a setting.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Apply to all post images option’ is closed to new replies.