I am assuming you have a way to generate the attachment ID when inserting the image. You can then use the attachment ID to populate the input value. Are you not talking about an on-page input field?
Try something like this:
<?php
//First get the attachment ID
$attachment_id = 8;
?>
<input type="text" name="tj_image_url" id="tj_image_url" value="<?php echo wp_get_attachment_url( $attachment_id ); ?>" />
Related Posts:
- Pass PHP variable to javascript
- Creating a default Custom Post Template that a Theme can override
- Pass PHP variable to javascript
- How to add jquery to my custom post type wp plugin
- get_option include in my adsense
- How to provide page_template path in custom plugin using WordPress
- Include theme header and footer in custom plugin
- Custom media upload content for inserting custom post shortcode
- Redesigning Custom Post Type “Add New” page
- How to Remove Certain Screen Options and Meta Boxes from add/edit post type?
- Is it possible to define a template for a custom post type within a plugin independent of the active theme?
- How to add custom content template part for a custom post type on main query using a plugin
- Page Templates from plugin not working after upgrading WP to 4.7 or upper version
- Handling jQuery Component Collision
- Is dynamic forms/entries possible in Widget?
- How can I add a custom header to a custom template in a plugin without using the theme folders
- Custom plugin giving: wp-admin/admin-ajax.php 400 (Bad Request)
- Editor not displaying dynamically after clicking on the button
- How to fetch serialized data from wordpress options
- How to load a new template page according to a particular URL?
- How to create popup same as wordpress popup feature
- Only execute jQuery function(on document ready) on the page has shortcode from plugin [duplicate]
- Way to hook into a sidebar call to replace it with a custom sidebar
- jQuery function didn’t work in my plugin
- Handling jQuery Component Collision
- Override comments.php template with plugin
- Check if email address exists front end with AJAX in a plugin
- Can we use a webservice with WordPress?
- Loco Translate: Custom Post and Custom Taxonomy Labels not translated in wp-admin menu
- WP Post Template – Templates in own folder
- Register Page Template from Plugin
- Best approach to fetch data from wp options to js file or php file
- Is it possible to create Custom Post plug-in?
- Ajax contact form widget plugin data not insert in database
- Creating a custom post type, adding custom meta fields, preventing all future editability of posts of this type
- Making a Template for a CPT created by a plugin
- Plugin-generated pages use Not Found or Pages Archive templates?
- How do I make sure that my plugin only runs on article detail pages?
- Plugin generated unexpected output – No PHP errors
- jQuery code didn’t run on my plugin
- How do I show content from a plugin using the template the site is currently working with?
- The Events Calendar Plugin – List View Background Colour Issue [closed]
- Custom Post Type template for homepage
- Ajax request sends url rather than data
- Adding a jQuery modal dialog to the admin area
- Custom Post Type, Custom Columns List
- Need to edit author permissions | custom taxonomy
- Is it possible to pin a post in second position from top
- wc_get_template_part doesnt display the content [duplicate]
- How to get the custom field value using SQL query
- Check if theme supports sidebar
- How to display the category name in the tab and post inside the tab in WordPress?
- custom post type plugin error [closed]
- How to display the custom post related blog by category?
- Problem with checked box on wp car manager plugin
- Ultimate Members Default Post Layout problem
- How to properly enqueue jQuery knob on WordPress without conflict?
- custom post type get_posts() function not work
- Create multiple posts when a custom post is created
- $wpdb->insert not working inside save_post tag
- update_post_meta is not working for me when I use e.preventDefault for update button
- Cannot view Custom Post Type no matter what I try
- How to prevent redoing get_posts queries and make results available to other scripts?
- how to do Thematic like this website using wordpress?
- WordPress Ajax request “Failed to load resource: the server responded with a status of 400 ()”
- WordPress Thickbox Navigation Issue in Gallery
- Dynamic input fields in WordPress Plugin
- Overwrite js code using WP_Footer
- Not displaying Woocommerce product page in lightbox
- Custom plugin giving: wp-admin/admin-ajax.php 400 (Bad Request)
- Overwriting Plugin’s Ajax callback function from theme
- Storing Array of values into wordpress options
- Can’t find variable is_single in my jQuery plugin
- Javascript in plugin not working
- How to Add Jquery FullCalendar in wp plugin in admin
- WordPress ajax not working in registration
- Ajax, jQuery and WordPress
- How to get site homepage from plugin?
- show Visual form builder in the front end
- Synch Custom Post Types (and Custom Fields, Cats, etc.) Between WordPress Sites
- Making a Custom Post Type Publish Loop
- Ajax in Plugins: returns the whole page
- Is an Office a custom post type [closed]
- Load css classes after using ajax calls
- WordPress show different custom post type
- Integrating WordPress Content into a jQuery Slider
- Jquery post responses 500 error after some time and lastly an 503 error
- Wrong block appender button showing
- How to make a Template page to show the information of different things Shop and Product page?
- How to access the page without registering in wordpress
- CPT template is not being automatically used single post pages
- How to make content as required in custom post type?
- public custom posts not showing in my wordpress plugin
- Woocommerce attatch files and custom input meta to cart items and then to order
- How to fetch WordPress Gallery Images to a Custom Post Type?
- Remove H1 title in admin post edit screen
- Ajax response from Media Selection does not update ALL information more than once
- How to Display News in a Timeline with Headline, Category, and Time?
- Load a custom post type template.html from a plugin
- implement pop up in wordpress cdn’s in wordpress admin side