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
- 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?
- 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
- Updating post meta for custom post types
- Template for custom post type shows all posts instead of just one
- Custom url structure for custom template
- remove custom taxonomy metabox form custom post type
- Custom Post Type Statuses
- How to Build a Movie Library in WordPress 3.x
- How do I use WordPress PHP functions in my Javascript code?
- 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
- Handling jQuery Component Collision
- Override comments.php template with plugin
- 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?
- jQuery for custom plugin not working with Divi theme
- Perform internal redirect in WordPress?
- How to prevent plugins from loading jQuery
- Unable to delete custom post types, confusion around capabilities
- Create shortcode to echo javascript
- Redirect to another page using contact form 7? [closed]
- how to force tag page layout to use same as search layout?
- How can I use a file in my plugin as a replacement for single.php on custom-post-type query?
- Disable Individual Plugins (specifically in Custom Post Types) on a per-post basis?
- Using ACF default value to autoincrement a number field
- How to add an element right after the article using jQuery?
- How to add a dvi tag to a shortcode then change a generated text using jQuery
- Default taxonomy template in plugin, override in theme
- How to Resize the Custom Post Images?
- Save user total active time after login in wordpress [closed]
- How to use template inside plugin shortcode with variables for big HTML code
- Plugin generated unexpected output – No PHP errors
- jQuery code didn’t run on my plugin
- 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
- 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
- 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
- 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
- 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
- public custom posts not showing in my wordpress plugin