WordPress.org

Ready to get started?Download WordPress

Forums

Does anyone know how to do this? (1 post)

  1. hotinthenews
    Member
    Posted 1 year ago #

    Hi;

    I have a prob that seemingly has no solution?

    Been looking for a way to remove [caption ....][/caption] from first image in single.php. Using 'strip-shortcodes()' function doesn't work because it removes everything... not what I want.

    I would like to be able to remove only the caption from the very first image but still showing the image. As it stands now, anything I use removes the entire string (and that includes the image). so not good.

    The reason for that is that on my mobile site I want the image to display with the caption but on my main site I want the image only.

    Does anyone have any idea how I can accomplish that?

    Thanks

    Lode

Topic Closed

This topic has been closed to new replies.

About this Topic