Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I am creating posts by using wp_insert_post function. It works fine as I provide values in array required. Sometimes it is required to create a post having gallery. Without any problem, it also works fine.

But when there is requirement of adding captions to gallery images, I'm not able to add them programmatically. All captions are stored in an array.

Is there a way or hook to add them in gallery by code? Or in other way how to add caption array element beneath each image of gallery?

share|improve this question
    
Anyone, here to tell? –  10wtaylor Apr 25 '13 at 18:47

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.