• Does anyone know how to set a default caption that will appear on all uploaded images? I am building a site for a car lot client that has to be ridiculously easy for him to use. I would like the caption to automatically read “Click to enlarge” on any images he uploads to the site, if possible.

    It sounds dumb at first glance, but he will be uploading images of cars on his lot, and they will all be captioned “Click to enlarge”…

    Thanks in advance!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator bcworkz

    (@bcworkz)

    My first thought would be to pre-populate the field in media uploader. This would likely require a javascript function added to the uploader. Not sure how to do this, especially in a way that avoids a dirty hack. Something that may be worth investigating though.

    Using PHP, you probably need to add it to the post content as it is inserted into the DB. Hook something like the ‘wp_insert_post_data’ filter. Your code would search the content for image tags in the post that are not embedded by caption shortcode. You would extract the needed info for the shortcode from the image tag, then insert the appropriate shortcode tags along with the needed caption.

    SEO Friendly Images plugin will do it for you. I use it and it works very well.

    Sorry, I’m wrong. SEO Friendly Images doesn’t do bulk captions, only Titles and the ALT attributes

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Set up default image title and captions?’ is closed to new replies.