How to Set Up Feed to Post's Custom Field Mapping

Feed to Post's  Custom Field Mapping gives advanced users more power over what data to bring into their posts and is most notably for users that import into other custom post types or use themes which display custom data.

NOTE: This feature requires the use of Custom Fields. Many times these are hidden in the Edit Post screen of your WordPress site. If you cannot see the Custom Fields metabox in the Edit Post screen (below the content area), go to Screen Options on the top-right of the screen and tick the checkbox next to the label “Custom Fields”.

Mapping Fields

The Custom Field Mapping interface consists of a list of mappings. You can have as many mappings as you wish, but keep in mind your server’s load, since every mapping is the equivalent of a single data-save.

Each mapping contains 3 important fields:

  • Namespace
    • The URL of the namespace where the RSS tag can be found. The namespaces shown for each mapping are managed from the Feed to Post settings page.
  • RSS Tag
    • The name of the tag in which the data that you wish to retrieve lies, without the namespace prefix. You can also retrieve data from a tag’s attribute by adding the name of the attribute in square brackets.
      • Example:  author[name]  retrieves the name attribute in  <namespace:author name=“Author Name”>...
  • Meta Field Name
    • The name of the meta field where you wish to store the retrieved data. You can name this field whatever you like.

Custom Namespaces

Custom Namespaces define the namespaces for RSS tags in your feed sources. When using this Custom Field Mapping option, you will need to choose one of the namespaces you have saved here. These are required by the plugin to be able to retrieve content from custom tags in your feeds. Here is how the two work together.

First, find the namespaces for the feed source.

  1. Go to the Add/Edit Feed Source page.
  2. Find the meta box called Feed to Post - Custom Field Mapping.
  3. Click on the Detect namespaces in Feed Source button.
  4. Copy each namespace and add them as explained below.

Second, go to the general Feed to Post settings and find the Custom Namespaces section.

  1. Add the namespace name and URL as provided by the steps above.
  2. Click on the Save Settings button below.

An Example

The following images demonstrate the use of the Custom Field Mappings feature.

First, we will need to start with the namespaces. Let’s click on the  Add another Namespace button to show a new row with two empty fields, fill them in as shown in the picture below and click Save Settings.

If you don’t know the Namespace URL, you can get it from the feed source. Create/Edit the feed source, and from the Custom Field Mappings meta box, use the  Detect namespaces in Feed Source button:

If the feed source has more than one namespace, put the feed source URL in your browser, and examine which fields you wish to import. Their prefix will correspond to the namespace that you will want to use. For instance:

Notice the  itms: prefix for each tag in the above iTunes RSS feed. The itms namespace is the one we want for this example, so we will copy its URL from the detector, and paste it into our namespace settings and call it “itms”.

After adding the namespace in the settings, we can start adding mappings to our feed sources:

In the image shown above, the feed source will use the itms Namespace we created in the settings page, to search for the itms:artistLink. Let’s save the feed source and make sure it is  Active so we can observe the results immediately.

The image below shows the resulting data saved in the imported posts, along with some other data added by WP RSS Aggregator and Feed to Post:

Still need help? Contact Us Contact Us