How do I extract values from custom tags in feedzy

This is a Premium Feature of the plugin. If you've already purchased Feedzy RSS Feeds Premium then you need to have both  Feedzy  RSS Feeds Lite & Pro activated to take advantage of the plugin's pro features.

The plugin imports fields such as title, content, etc... What if you want to fetch a custom tag's value such as date updated or rating? This tutorial helps you to do it.

Let's take an extract of an XML file from where we need to extract values. 

<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:media="http://search.yahoo.com/mrss/" xmlns:yt="http://www.youtube.com/xml/schemas/2015">
   <link rel="self" href="http://www.youtube.com/feeds/videos.xml?channel_id=UCBcRF18a7Qf58cCRy5xuWwQ" />
   <id>yt:channel:UCBcRF18a7Qf58cCRy5xuWwQ</id>
   <yt:channelId>UCBcRF18a7Qf58cCRy5xuWwQ</yt:channelId>
   <title>L2inc</title>
   <link rel="alternate" href="https://www.youtube.com/channel/UCBcRF18a7Qf58cCRy5xuWwQ" />
   <author>
      <name>L2inc</name>
      <uri>https://www.youtube.com/channel/UCBcRF18a7Qf58cCRy5xuWwQ</uri>
   </author>
   <published>2012-04-04T12:38:47+00:00</published>
   <entry>
      <id>yt:video:vMh_QPKGr1Y</id>
      <yt:videoId>vMh_QPKGr1Y</yt:videoId>
      <yt:channelId>UCBcRF18a7Qf58cCRy5xuWwQ</yt:channelId>
      <title>Nobel Prize Economics in 6 Minutes</title>
      <link rel="alternate" href="https://www.youtube.com/watch?v=vMh_QPKGr1Y" />
      <author>
         <name>L2inc</name>
         <uri>https://www.youtube.com/channel/UCBcRF18a7Qf58cCRy5xuWwQ</uri>
      </author>
      <published>2018-12-13T21:17:56+00:00</published>
      <updated>2018-12-15T13:44:59+00:00</updated>
      <media:group>
         <media:title>Nobel Prize Economics in 6 Minutes</media:title>
         <media:content url="https://www.youtube.com/v/vMh_QPKGr1Y?version=3" type="application/x-shockwave-flash" width="640" height="390" />
         <media:thumbnail url="https://i3.ytimg.com/vi/vMh_QPKGr1Y/hqdefault.jpg" width="480" height="360" />
         <media:description>Nobel Prize-winning economist Paul Romer explains how ideas translate into growth.

Episode 197</media:description>
         <media:community>
            <media:starRating count="873" average="4.89" min="1" max="5" />
            <media:statistics views="20579" />
         </media:community>
      </media:group>
   </entry>
   <entry>
      <id>yt:video:vTutsbudlBI</id>
      <yt:videoId>vTutsbudlBI</yt:videoId>
      <yt:channelId>UCBcRF18a7Qf58cCRy5xuWwQ</yt:channelId>
...<br>

You can achieve it depending on how you are importing the posts:

Extract price using the shortcode

Please note this feature is only available in the PRO plugin.

Follow the table below to understand how to provide the value of the mapping attribute of the shortcode

Element/Attribute Value of 'mapping' attribute Extracted value
Feed level element
<title> price=feed|title L2inc
<yt:channelId> price=feed|yt:channelId UCBcRF18a7Qf58cCRy5xuWwQ
Item level element
(each item will correspond to one element, so we will assume this is the first item)
<updated> price=updated 2018-12-15T12:09:11+00:00
<media:title> price=media:title Nobel Prize Economics in 6 Minutes
<media:starRating> / average price=media:starRating@average 4.88

Feed to Post

Please note this feature is only available in the PRO version of the plugin.

Follow the table below to understand the format of the magic tags that you can use.

Element/Attribute Tag Extracted value
Feed level element
<title> [#feed_custom_title] L2inc
<yt:channelId> [#feed_custom_yt:channelId] UCBcRF18a7Qf58cCRy5xuWwQ
Item level element
(each post will correspond to one element, so we will assume this is the first post)
<updated> [#item_custom_updated] 2018-12-15T12:09:11+00:00
<media:title> [#item_custom_media:title] Nobel Prize Economics in 6 Minutes
<media:starRating> / average [#item_custom_media:starRating@average] 4.88

Let's try to import average rating field using the above table. We want to fetch this average rating:

Step 1: Add Feed URL

Add a new import feed with URL https://www.youtube.com/feeds/videos.xml?channel_id=UCBcRF18a7Qf58cCRy5xuWwQ

Step 2: Add Filters

Step 3: Assign Tags

Click On "Add custom fields" and add values. 

  • Key Name: Average Rating
  • Key Value: [#item_custom_media:starRating@average] (as per the above table)
  • You can also add the tag [#item_custom_media:starRating@average] in "Item Content" field.

Output 1:

Output Where Item Content field is showing the Average rating:

Output 2:

It will create a new custom field named "Average Rating" and fetch the rating value in it.

Note: Gutenberg/Block Editor don't have custom fields enabled by default. If you don't see the above screen, enable them by using these steps.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.