All I want to do is get Wordpress's featured image XML code to use a jpeg link as the meta_value, instead of the image gallery data-id number.

Basically change this code:


To something reading like this:


I appreciate the help, hopefully its something simple enough.

  • "use a jpeg link as the meta_value, instead of the image gallery data-id number" - how did you code the number? Are you talking about an XML file you generated/coded yourself? If not, how is it generated - using a plugin?
    – Sally CJ
    Jan 20, 2022 at 8:26
  • Hi, Sally, Im guessing your're new too. The id is generated from the wordpress export function; which generates the XML. Use the link below, putting in your site name. -- yourWordpressSiteName.com/wp-admin/export.php
    – fhonics
    Jan 20, 2022 at 9:11
  • 1
    @sally, I actually solved it. I will post in a bit.
    – fhonics
    Jan 20, 2022 at 13:28

1 Answer 1


You have to post two "items" in the xml. The first item is the "parent" portfolio-item... and the second is the attachment linking to the parent item. See below the entire XML rss. (I excluded all the information within the "item tag" which was not specific to this question to keep the answer light and easier to follow).

After writing this, upload the XML file using WordpressDashboard>>Tools>>import or (http://yourSite.com/wp-admin/import.php) Make certain you import checking the "Download/Import images" checkbox.


    <title>Portfolio-item Name</title>



Simultaneously add the attachment item which links via the id(number) you assign: In this case im using 2222222 as the image id.




Hope this helps. It was difficult to find this, but I sorted it out, hopefully it will help another newbie like myself.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.