Plugin Author
pepe
(@pputzer)
Hi @wellie1975, adding a custom credit link to an external site should work out of the box, yes.
Regarding data storage, the credit information is stored using attachment meta data, so it is stored in the wp_postmeta table using the meta_key values of _media_credit, _media_credit_url, and _media_credit_data.
Hi, thank you for the response.
I exported the _media_credit values and imported them in the wp_postmeta table of the new database. On the page the image is set like <!– wp:image {“id”:43068 …} –><figure><img … class=”43068″>, etc.
The post_id can be found now in the wp_postmeta table. What can I do to make the media credit visable on the new site?
Plugin Author
pepe
(@pputzer)
Ah, if you imported the HTML content as well, you would need to insert the shortcodes also (if still using the legacy editor – in that case, the attachment metadata is only used when inserting the image into the editor). For Image blocks, the media credit is automatically shown without manual HTML changes.
You can filter your output to automatically display media credits even when using the old editor, but that is highly theme-dependent (markup-parsing using regexes).
Hi, I changed the editor to Gutenberg in my Hello Elementor child theme. Currently the _media_credit values are stored in the existing database. When I connect to the new database, the _media_credit values are not visable. I tried to import the meta_key values into the new database, but this doesn’t work because the post_id’s are different. It there a way to map these values? All images on the new site have currently the absolute path, but the figcaption is not visable. Use https://www.amerikaonly.nl/florida-restaurants/ and try to link the image and show the media credit.
Plugin Author
pepe
(@pputzer)
That depends on how you created the new database. If you know the old and new post_id (for the attachment post, I presume), you could “remap” the meta data table. If the rekeying is random, then probably not.
Or have you been able to fix the issue in the meantime? The example URL you give seems to show the media credit.
Hi, I couldn’t remap the meta data, so I uploaded only the new design and restructured the live site. Thanks for your time.