• mshane8

    (@mshane8)


    In the built in WP gallery option within the media library is there a way to selectively remove/turn off the captions. In other words I want some of the images in the gallery to show captions and others not BUT ideally within the media library itself I want all images to have captions.

    [gallery size="medium" ids="10991,10990,10989,10973"]

    I am wondering if within the shortcode if there is an option for maybe image ids to display captions and image ids to hide captions.

    Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Joy

    (@joyously)

    No, not in the built in gallery. There are many plugins that override the gallery shortcode. There are some internal filters you might try, but not sure how you would know which captions to leave and which to remove.

    Thread Starter mshane8

    (@mshane8)

    Thanks Joy-

    It would have to be a conditional statement with something like if X is this then remove caption, otherwise print it.

    X would whatever calls the photo id values so in this case Nocaption.

    So the shortcode could call a function and be written like

    [gallery Nocaption=10091, 10092 etc,,, ids= 10093, 10094,]

    something specific along those lines. I just wasn’t sure if it was already included in WP or not.

    Thanks so much!

    • This reply was modified 5 years ago by mshane8.
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘WordPress Photo Gallery’ is closed to new replies.