• We have to manually rebuild our db, 12,000 db rows ?? from our old site to our new WP platform.

    To help with that process I want to preload text in the caption and description field when adding photos )Add Media page). So I am wanting to know how to add text to the text area fields for caption and description. I have tried editing different files via ftp but cannot achieve the result. So I’m asking… pretty please ??

Viewing 1 replies (of 1 total)
  • Moderator bcworkz

    (@bcworkz)

    Since the media library is largely JavaScript driven, I would populate such fields using JavaScript. Unfortunately, I don’t know what event could be best used to do this. If all else fails, a field receiving focus could be used, but it would require clicking a field to get the text to appear. If you sift through wp-includes/js/media-editor.js, perhaps a better event will become apparent.

    So you are manually adding new images to thousands of existing posts? Are you sure there is not any way to automate this with a custom PHP script of some sort? Even if you had to create a huge data table of what photos to add to which posts, I would think that effort plus developing the related script would still be faster than manually clicking through the add image dialogs. If there is any way to dynamically determine such data, the script approach would almost certainly be faster.

    Of course, the coding skills you or available resources have would factor into the decision of best approach.

Viewing 1 replies (of 1 total)
  • The topic ‘In Add Media, how to add text to textarea for Caption and Description fields?’ is closed to new replies.