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.

On wp-admin/post.php?post=447&action=edit for example I have a link and an input.

The link appears as follows:

<a href="#" class="button insert-media add_media" data-editor="tj_image_url" >gallery</a>

When I click the link the media library opens, and i'd like the URL of the inserted image to populate an input field, eg.

<input type="text" name="tj_image_url" id="tj_image_url" value="VALUEHERE" size="30" />

How can I do this?

share|improve this question
What have you tried so far? –  kaiser Feb 17 at 23:22
add comment

Your Answer


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

Browse other questions tagged or ask your own question.