Title: custom feed structure
Last modified: June 14, 2018

---

# custom feed structure

 *  Resolved [Stefano Castelli](https://wordpress.org/support/users/stefanocastelli/)
 * (@stefanocastelli)
 * [7 years, 12 months ago](https://wordpress.org/support/topic/custom-feed-structure/)
 * hi, i’m using the custom feed to create a cstom product feed for an italian directory
   system called “trovaprezzi”: they absolutely need a custom xml structure like
   this:
 * <Offer>
    <Name><![CDATA[]]></Name> <Brand><![CDATA[]]></Brand> <Description><![
   CDATA[]]></Description> <Price><![CDATA[]]></Price> `<![CDATA[]]>` <Link><![CDATA[]]
   ></Link> <Stock><![CDATA[]]></Stock> <Categories><![CDATA[]]></Categories> <Image
   ><![CDATA[]]></Image> <ShippingCost><![CDATA[7,90]]></ShippingCost> <PartNumber
   ><![CDATA[]]></PartNumber> <EanCode><![CDATA[]]></EanCode> </Offer>
 * is it possibile to modify the xml structure of the feed, in order to be compliant
   to what is needed from Trovaprezzi ?
 * thx,
    stefano castelli
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fcustom-feed-structure%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 9 replies - 1 through 9 (of 9 total)

 *  [evavangelooven](https://wordpress.org/support/users/evavangelooven/)
 * (@evavangelooven)
 * [7 years, 12 months ago](https://wordpress.org/support/topic/custom-feed-structure/#post-10399864)
 * Hi Stefano,
 * Thanks for using our plugin and reaching out to us. Do you happen to have a document
   from Trovaprezzi with their official feed requirements in it? If so, we can possibly
   create a template for it.
 * All the best,
    Eva
 *  Thread Starter [Stefano Castelli](https://wordpress.org/support/users/stefanocastelli/)
 * (@stefanocastelli)
 * [7 years, 12 months ago](https://wordpress.org/support/topic/custom-feed-structure/#post-10400002)
 * Hi Eva,
    thx for your answer 🙂
 * there is no official english documentation, but at this page you can see a precise
   description of the nees:
 * [https://feedonomics.com/trovaprezzi-feed-specifications/](https://feedonomics.com/trovaprezzi-feed-specifications/)
 * and in this page you get a preview of the feed structure, that has the same requirements
   of the one i added in my first statement:
 * [https://www.merlinwizard.com/integrare-e-commerce-trovaprezzi.htm](https://www.merlinwizard.com/integrare-e-commerce-trovaprezzi.htm)
 * if you look at the default xml of the plugin, you have a <product> tag as delimiter
   ofeach prodcut, but trovaprezzi requires this tag to be <Offer>, and the names
   must be in upper case on the first letter and so on.
 * if there is some documentation about creating templates, please link it to me
   🙂
 * thx,
    s.
 *  [evavangelooven](https://wordpress.org/support/users/evavangelooven/)
 * (@evavangelooven)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/custom-feed-structure/#post-10403916)
 * Hi Stefano,
 * Thanks for the links! We just started on creating the template but we already
   run into an issue. The two links you copy/pasted say different things, especially
   when it comes to the field names.
 * For example:
    Feedonomics says: links Merlinwizard says: Product Url
 * And this happens for a lot of fields. So, which one to use when creating a template?
 * All the best,
    Eva
 *  Thread Starter [Stefano Castelli](https://wordpress.org/support/users/stefanocastelli/)
 * (@stefanocastelli)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/custom-feed-structure/#post-10404230)
 * Hi Eva,
    and thx a lot for your help 🙂
 * just refer to my first structure: it’s the one i already created for the project,
   but now i’m looking for a more flexible solution, so i’m trying to use plugin,
   but a working feed has been already created, and the structure is the following(
   i’ll give you the entire xml/php code, so you can see how the feed is now working:
   there are custom taxonomies, custom fields, and an “if” selector on the price):
 * <products>
    <?php while(have_posts()) : the_post(); ?> <offer> <name><![CDATA[
   <?php the_title_rss(); ?>]]></name> <brand><![CDATA[<?php echo do_shortcode(‘[
   wpv-post-taxonomy type=”product_brand” separator=”;” format=”name” order=”asc”]’);?
   >]]></brand> <description><![CDATA[<?php the_content_rss(); ?>]]></description
   > <price><![CDATA[<?php $sale = get_post_meta( get_the_ID(), ‘_sale_price’, true);
   $regular = get_post_meta( get_the_ID(), ‘_regular_price’, true); if ($sale) echo
   $sale; else echo $regular; ?>]]></price> `<![CDATA[<?php echo $sku = get_post_meta(
   get_the_ID(), '_sku', true); ?>]]>` <link><![CDATA[<?php the_permalink_rss();?
   >]]></link> <stock><![CDATA[<?php echo $stock = get_post_meta( get_the_ID(), ‘
   _stock’, true); ?>]]></stock> <categories><![CDATA[<?php echo do_shortcode(‘[
   wpv-post-taxonomy type=”comparatori” separator=”;” format=”name”]’); ?>]]></categories
   > <image><![CDATA[<?php echo do_shortcode(‘[wpv-post-featured-image size=”medium”
   raw=”true”]’); ?>]]></image> <shippingcost><![CDATA[7.90]]></shippingcost> <partnumber
   ><![CDATA[<?php echo $pn = get_post_meta( get_the_ID(), ‘wpcf-codice-produttore’,
   true); ?>]]></partnumber> <eancode><![CDATA[<?php echo $ean = get_post_meta( 
   get_the_ID(), ‘wpcf-codice-ean’, true); ?>]]></eancode> </offer> <?php endwhile;?
   > </products>
 * hope this can describe enough the needs 🙂
 * thx,
    s.
 *  Thread Starter [Stefano Castelli](https://wordpress.org/support/users/stefanocastelli/)
 * (@stefanocastelli)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/custom-feed-structure/#post-10404237)
 * oh, i noticed the line with the “code” (sku) values has been stripped, so i try
   to insert again with some spaces to trick the engine 🙂
 * < code ><![CDATA[<?php echo $sku = get_post_meta( get_the_ID(), ‘_sku’, true);?
   >]]>< / code >
 *  [evavangelooven](https://wordpress.org/support/users/evavangelooven/)
 * (@evavangelooven)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/custom-feed-structure/#post-10410697)
 * Hi Stefano,
 * We have created our own very flexible template engine so making changes in the
   PHP-code of the plugin itself is not something we prefer. We just need to make
   sure we are using the correct and official field- & header names for the template
   to be created. So, you are sure the first one you described is the correct one
   that is being accepted by Trovaprezzi?
 * All the best,
    Eva
 *  Thread Starter [Stefano Castelli](https://wordpress.org/support/users/stefanocastelli/)
 * (@stefanocastelli)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/custom-feed-structure/#post-10410829)
 * Hi Eva,
    if you prefere you can directly download yourself here:
 * [http://www.lascienzadellasalute.it/trovaprezziok.xml](http://www.lascienzadellasalute.it/trovaprezziok.xml)
 * this is “Trovaprezzi validated” and is being working since 1 year ago 🙂
 * ciao,
    s.
 *  Thread Starter [Stefano Castelli](https://wordpress.org/support/users/stefanocastelli/)
 * (@stefanocastelli)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/custom-feed-structure/#post-10424704)
 * Hi Eva,
    any news?
 *  [evavangelooven](https://wordpress.org/support/users/evavangelooven/)
 * (@evavangelooven)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/custom-feed-structure/#post-10437793)
 * Hi Stefano,
 * No news yet unfortunately. It is still on our to-do list. As we are currently
   working on a big new feature (adding Dynamic Remarketing features to the plugin)
   we do not have much time to pick up other issues.
 * Anyhow, we did not forget about it 🙂
 * All the best,
    Eva

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘custom feed structure’ is closed to new replies.

 * ![](https://ps.w.org/woo-product-feed-pro/assets/icon-256x256.png?rev=3111496)
 * [Product Feed PRO for WooCommerce by AdTribes – Product Feeds for WooCommerce](https://wordpress.org/plugins/woo-product-feed-pro/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woo-product-feed-pro/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woo-product-feed-pro/)
 * [Active Topics](https://wordpress.org/support/plugin/woo-product-feed-pro/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woo-product-feed-pro/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woo-product-feed-pro/reviews/)

## Tags

 * [custom feed](https://wordpress.org/support/topic-tag/custom-feed/)

 * 9 replies
 * 2 participants
 * Last reply from: [evavangelooven](https://wordpress.org/support/users/evavangelooven/)
 * Last activity: [7 years, 11 months ago](https://wordpress.org/support/topic/custom-feed-structure/#post-10437793)
 * Status: resolved