Why:
In WordPress one can only attach a file to a single parent post. This is because the relationship is stored in the wp_post table as the post_parent field. It’s a bigint(20) type so it can only contain a single number (ID).
Workaround:
We would need to cook something ourselves, maybe that could be by using a custom taxonomy for our attachments or perhaps using custom fields (post meta) to store the attachments IDs?
Or we could try some plugins out there that can help us re-using our attachments.
Related Posts:
- How can I add an image upload field directly to a custom write panel?
- How to implement add_image_size in a plugin
- How to catch images with blank dimensions?
- How to find attachment ID for first image in a post
- Having Problem On Getting WP Post Gallery Images URL
- Set first image (external) as featured image / thumbnail
- Hook event for upload image in the menu
- How to get an image transferred via FTP or script to appear in Media Manager?
- Is there a better way to implement responsive images than what WordPress uses by default?
- Save image as featured image
- How to show large image in checkout page using WP Ecommerce plugin [closed]
- Hook to get image filename when it is uploaded
- Resizing Images for a Gallery-Plugin?
- How to serve different thumbnails/images depending on users browser/platform
- How to Upload Images From a Folder (Not WP_Uploads)
- How to export post meta with images in wordpress
- Get attachments from a post
- Putting a resized image into media library with wp_get_image_editor(
- Display list of uploaded images, filtered by user under a specific user group
- Upload multiple images and insert them into custom html code
- Which is the better way to store images for the plugin?
- Uploaded attachment not set as featured image
- How do I change the image from the default mysteryman in the WP Profile page
- Hook after attachment added and cropped
- Conditional Generation of Image Sizes using add_image_size
- how to change image of jquery slider plugin
- WP Still Generating 150×150 Thumbnail Size Even After Un-Setting Small Size in Functions.php
- Cleaning a filename after image sideloading a url that contains `%20`
- How to list all images used on a specific page?
- Screenshots on plugin page taken old [closed]
- Resize not resizing images with Capitial extension like JPG
- How to move an image in a plugin to the upload directory and make it as a media of wordpress?
- The URL of images on my website changed after being set as featured image
- Getting incorrect filepath inside custom block front-end output using @wordpress/create-block tutorial
- WordPress Favicon not Working For Images/Videos/PDFs
- Adding the image selector/uploader to an admin back page
- WordPress discards PNG file when uploading plugin file
- Hook for validating and rejecting frontend image upload
- WordPress Iframe for blog image
- Replace the WordPress Media Library Uploader
- Caption Shortcode: what filter to change the image size?
- Filter the_content() to add custom figure tags
- Issue on Getting WP Gallery Items In cpt-single.php As Attachments
- Is it possible to convert various image types from remote URLs to WebP and then serve them immediately?
- Images not displaying on live server
- Using “add_image_size” to register custom image sizes inside plugins not working
- Leveraging Core Functionality in Icon Upload Plugin [closed]
- Displaying an Uploaded Image as a Custom Avatar in WordPress
- Add a custom image source
- Upload to a specific media folder created by FileBird Lite
- Set srcset on a block image
- What’s the difference between term_id and term_taxonomy_id
- How do I programatically insert a new menu item?
- How to tell if an option has been created vs an empty option?
- jQuery in header or footer
- Notice: _usort_terms_by_ID is deprecated since version 4.7.0! Use wp_list_sort instead
- How to make WordPress use non-greedy shortcode parsing?
- How to get current page name in my wordpress plugin
- WP Cron doesn’t save or in post body
- Use register_taxonomy() in register_activation_hook()
- Pages 404 in wordpress
- Multiple entries in get_option results? or why is _multiwidget set to 1?
- Why is WP_Mock not used instead of WP_UnitTestCase for writing unit tests by most plugins?
- Metabox Not Showing on Custom Post Type But On Pages and Post
- Using Checkboxes on Plugin Options Page for Custom Plugin
- save_post hook not triggered in WP v3.6.1
- Using a Shortcode to Replace Themes Stylesheet?
- Where should I put “run once” plugin pages?
- Plugin Development Output
- Adding Second Plugin Author
- Securing/Escaping Output of file content – reading via fread() in PHP
- Run code once when block is created
- Intermittent database errors when accessing WordPress database
- How to create a “View” page for entry in add_menu_page wordpress admin area (CRUD operation)
- what is the standard ulr for wordpress plugin development?
- Customize WooCommerce my account dashboard through plugin
- Precaching WordPress posts with a ServiceWorker
- Shortcode returning localized HTML part
- global $current_user not current user
- How to set a cookie for logged in users to md5($user->ID . “my_secret”)?
- Meta box on options page save form problem
- Sending an SMS on new order placed – WooCommerce
- Where to use nonce
- How to show parents of current page category, excluding the category?
- Overwriting a plugin function
- How do I debug an error that a plugin is causing?
- What could cause a WP Option to get truncated?
- Simulating timeout is not working
- Add custom product data using javascript when add to cart button is clicked
- How to develop a wordpress plugin for front-end user?
- Woocommerce Custom Checkout
- get_users() not returning all users in site
- Issue with iframe in TinyMCE
- save_post not called in plugin / custom field still saving overwriting metaboxes
- Need edit profile link in the menu for logged in users
- PHPUnit Testing Installation Issue
- Problem with Owl Carousel, infinite loop [closed]
- Add an action only for a specific user in a plugin
- How to run this plugin every time a post is saved?
- how to send csv file to other server using wp_remote_post?