How to remove the img tag from the native gallery markup and replace it? (2 posts)

  1. Marc Toensing
    Posted 3 years ago #


    how do I remove the image tag from the gallery markup? The problem is that the images are being loaded if the img tag is in the DOM.

    Wouldn't it be better if the markup would look like this:

    <li><a href="link to image">Image title</a></li>

    Any idea?

  2. alchymyth
    Forum Moderator
    Posted 3 years ago #

    general possible approach: http://wordpress.org/support/topic/how-to-put-numbers-on-image-gallery?replies=4#post-2802608

    you basically copy the gallery shortcode into functions.php of your theme and edit the code;

    looking at your code snippet, I have no idea what you are trying to achieve...

Topic Closed

This topic has been closed to new replies.

About this Topic