RSS Post Importer - Use Case - How to Import Articles Using RSS Feed From Another Site


Use Case – How to import articles using RSS feed from another site.

Back to User Guides

Note: This guide requires:

Video Use-Case


Introduction

The  RSS Post Importer plugin lets you import posts or pages from an external site to your Wordpress site. It can be useful for linking together sites that you own that should share content mutually, or for scraping similar sites for content that relates to what your site is about.

It is a one time set up plugin that continues to work after being configured allowing you to find great quality content providers and funnel them through your domain.

The RSS Post Importer is a must-have for affiliate marketing, for event listing sites, for new sites and for keeping content across multiple sites up to date without all the donkey work.

Use Case Front-End

Use Case Assumptions

In this example we will consider how to import articles using RSS feed from another site. 

We assume that you have already bought the plugin, but not installed it yet.

It follows:


Installing The plugin

The process is the same for all CM plugins and add-ons.

  • Download the plugin from your customer dashboard
  • Log in to WordPress and navigate to the WordPress Admin  → Plugins settings
  • Click on Add New
  • Activate it and add the license

Learn more: Getting Started - Plugin Overview


Configuring the plugin

Before creating RSS feed, we need to configure the plugin first.

Navigate to Admin Dashboard → CM RSS Post Importer Pro → Options.

There are two tabs -  Plugin Options and Plugin Diagnostics.

Plugin Options

On the first tab you can find the following options:

  • Processing batch size - Number of RSS feed items processed by WP-Cron job at once. 
  • Restart Processing CRON - Clicking on this button will restart the task responsible for processing the feeds. Learn more about using this option: CRON Troubleshooting
  • Run RSS Processing - Clicking on this button will run the task responsible for processing the feeds.
  • Keywords exact match - All capital letters will be taken into account during searching for keywords.
  • User agent - User agent used to fetch RSS feed. Some servers block access to theirs resources when queries are made by WordPress - you can try to fool them by changing user agent. 
  • Delete Fetches - Click to delete fetches.This options does not delete already imported posts - only fetches. This option can be useful in case if there is some broken RSS, so you can use this clear the RSS queue. It can also be used to clear the database from time to time, to not overload it.
    • Choose the RSS - In this dropdown you can choose either to delete all fetches or only fetches of some definite RSS.
  • Delete Posts if they was deleted in RSS Source - When the option is enabled, imported posts will be removed from your feed if they were removed in the RSS source.

Don't forget to click the button  Save Changes.

Plugin Diagnostics

The second tab is  Plugin Diagnostics.

The plugin depends on WordPress Cron - a service that schedules events to be executed at regular intervals, so make sure it's running correctly. You can retrieve advanced log information by choosing the problematic feed in the dropdown list and clicking the  Fetch button. 

Creating the RSS feed

Step 1 - Adding a Feed

Let's consider creating the RSS feed step-by-step with an example.

When adding a feed, you have many options available. This can make the process more complex but ensures that the plugin only collects and displays the information you want from the feed.

To begin adding a feed, head to  Admin Dashboard → CM RSS Post Importer Pro → RSS Feeds. Then, click the button Add RSS Feed.

The General settings allow the Feed to begin importing and offer some blunt controls for the overall importing of the feed, before the nitty-gritty settings that follow.

  • Feed URL - The source URL of the feed. (e.g. http://example.com/music/charts/topfourty.rss
  • Validate - Click on this link to check if the feed is valid.
  • Site Validation

    Make sure the source you are trying to import is a valid RSS feed. You can check this by using the "validate" link. Also, please visit our troubleshooting guide as some sites block importing posts from their site.

    The site we want to use is vaild:

  • Pause Fetching - Check this box to temporarily disable the RSS Post Importer plugin from importing any more posts from this RSS Feed.
  • Reimport - Apply this option if you change some settings that determine how feeds are imported (steps 2, 3 or 4). This setting allows the RSS feed to be reimported according to the new settings. Once you click the "Update" button, there will be a red-colored notification that the reimport is done.
    Note that  the feeds will NOT be reimported right away. This option ensures that any new rules will be applied during the next import.

    It works the same as clicking Reimport on the feed management screen:

  • Processing Interval - How often the plugin will run and import any new RSS content added. If you set this number to run frequently this may slow your site depending on the number of posts available on the source site. Make sure you understand the impact of the frequency on your site's performance.

    TIP: Creating New Values

    You can create new options, such as 'Every two days". Learn more: RSS Post Importer - Advanced - Creating Processing Intervals With WP Crontrol
  • User Agent - Allows control over the User-Agent signature applied to the RSS request. This can be a useful way to bypass RSS request blocks to certain devices. This setting just overwrites the generic setting for all feeds.
  • Add "?format=xml" to the end of the feed URL - Check this if you are using a FeedBurner feed to ensure compatibility. Let's enable this option, as the site that we chose uses FeedBurner.

  • Prevent feed caching on feed's server - Enable this on the rare cases when the feed is cached on the feed's server for some reason. When that is the case, the feed might result in the same result for days.

Step 2 - Choosing What's Important in the Feed

Processing Conditions

  • Avoid entries with exact same title - Skips importing RSS items with the same title as items are already imported.
  • Fetch Limit - The limit to the number of RSS posts that the plugin will fetch from the source. Even if the source has more posts the plugin will only import the amount set. If you don't set any limit it will import everything.
  • Since date limit - The limit to how far back the RSS Post Importer will search back for posts to add. The since date is relevant to the date which appears in the original post metadata (when the post was written). This is an optional filter and, if not set, no timeframe limit will be set when importing posts.

    The format used in this case can be a specific date - for example, 2021-01-31 or a text describing how many days back from the current day to fetch article in the following format. For format detail see strtotime documentation.
  • Until date limit - The upper date limit or until when the RSS Post Importer plugin will search for posts to add using the original date shown in the post's metadata. (both the 'Since date limit' and the 'Until date limit' will search without limits if left empty).
  • Match keywords (comma separated) - Will import posts only if they contain the keywords defined in this text area.
    This is an important feature that lets you filter the posts you are importing based on keywords found in the post content. You can list many keywords and if ONE of the keywords is found the post will be imported
  • Exclusion keywords (comma separated) - Will import posts only if they do not contain keywords defined in this text area. You can list many keywords in this list. In case only ONE of the exclusion keywords will be found the post will not be imported.

    Important: exclusion keywords have higher priority than match keywords. Feed item title, description and content are searched for keywords.

Step 3 - Choosing What's Important in the Post

Processing Settings (Import)

In this step, we'll define how the posts will be processed. This means, for instance, trimming the title, removing HTML tags and also pinpointing the source URL, so that we can include it later in the post.

By clicking on customize, it is possible to change the way posts are imported using the RSS Importer Plugin. 

Title and Description

The Title and Description have the same Configuration options.

  • Word Limit - Limits the number of words from the beginning of the  text body that  will be imported. You can also trim the number of words by using the parameter trim_words=x in a shortcode, being x the number of words.
    For  example if  you want display only the first 55 characters of the title you can use [rss_feed_item_title trim_words=55]. This also applies to the description or content  shortcodes 
  • Strip all HTML tags - Removes all HTML tags (such as <h1>, <h2> <strong> etc.), importing nothing but a plain text version of the original feed. You can use a parameter inside the shortcode. For example [rss_feed_item_title strip_all_tags=1]
  • Link to original post URL - Force linking to the original content / post URL.

Content

The Content has the same configuration as Title and Description plus two additional options:

  • Cut off images from content - Exclude images from feed item content.
  • Enforce wpautop() function on content - Enable to surely run wpautop() function on content to convert line endings of text to html paragraphs and line breaks. May be necessary if current theme doesn't perform wpautop() by default.

Note on YouTube Feeds

When using a YouTube feed, the  [rss_feed_item_description] shortcode will produce the content of the <media  description>   tag. So there's no need to create a specific XML Tag for that purpose.

Image

Clicking on  customize for the Image shortcode produces different configuration options.

  • Height - Sets the height of the imported image in pixels.
  • Width - Sets the width of the imported image in pixels.
  • CSS class name - Allows for a class name to be applied to the image for further styles to be applied using CSS styling.
  • Link to original post URL - Force linking to the original content / post URL.

Learn more what parameters can be used inside the image shortcode.

Permalink, Date, Source, Enclosure

The final four  shortcodes  cannot be modified and are simply there to allow for some reference information to be added to the imported post after import to credit the original content creators.

  • Permalink - Includes the URL address of the original article. You can use this shortcode [rss_feed_item_permalink] in case you want to print out the URL of the article in the content or elsewhere in the imported post
  • Date - Includes the Publish date of the article. You can use this shortcode [rss_feed_item_date]  in case you want to print out the URL of the article in the content or elsewhere in the imported post.

    The format attribute of the date is taken from the PHP format and can be changed in many ways. Please check the following guide  http://php.net/manual/en/function.date.php for more options.
  • Source - Includes the URL of the RSS feed source that has been imported. For example, if the permalink is https://www.cminds.com/blog/wordpress/10-wordpress-glossary-plugins/ then the source will be https://www.cminds.com
  • Enclosure - Returns the URL of the enclosure. RSS enclosures are hyperlinks to multimedia content related to that feed - for instance, the  . mp3 file of a podcast feed or the .jpg file of an image from a gallery feed.

Custom XML Tag

Finally, the  Add New XML Tag button can be used to create new  shortcodes . Tags can be given a name and then the shortcode attributes added between the square braces.

This is an important feature that can support  processing additional  metadata tags which are found in the post RSS feed. For example, if the feed includes a price tag, you can add the tag description in the section and then use it elsewhere in the post template.

To learn more about this feature, check the specific guide: RSS Post Importer - Advanced - Extracting Specific XML Tags.

Step 4 - How the Posts Are Displayed (Post Template)

Once the RSS is imported the RSS Importer Plugin works to Export the post onto your own site. The following settings determine how this output will appear and what attributes it will have.

  • Post Type - Choose what kind of post it will be. A page, a custom post type or something else. The default is a WordPress post
  • Category - The category that imported posts will fall under can be configured here. This applied only if the post type created on your site is a regular "Post"
    • Alternatively, the checkbox below can be checked to Use category from feed item. Doing this will use the original category. If this does not exist on your site, it will create it.
      • Categories cannot be created manually here in the Post Template section. To add new categories this must be done before in Posts → Categories.
  • Status - Determines the publish status of the Post. It can be published automatically, saved as a draft or held for revision. It can also be set as private.
  • Author - Chooses between
    • Get author from item - Try to fetch the authors of the RSS item and set them as the author.
    • Select author by default - Setting a Site user as the Author.

      Note: How the Author Fetching Works

      If the option  Get author from item is checked, the fetched author from RSS source (XML file) is compared with the list of existing users on your site. If fetched author's username or email matches the username or email of one of your site users, then that user will be set as the post author. If there is no matching users on your site or if the option Get author from item is not checked, then the default user that is chosen in the dropdown Select author by default will be set as the post author.

      Important: the plugin does not create new users on your site based on fetched post authors from RSS source (XML file).

  • Published on - Choose between the original publication date and the Import date as the date to be used for the publication date to appear on your site.
  • Add "nofollow" to links - Adds the nofollow attribute to links in the post. This is important for search engines that are indexing your site in case you don't want them to follow the links included in the important articles. 
  • Set featured image - Downloads and saves the featured image to the WordPress media of your site. Once found, it will also be set as the featured image for the saved post. You can also use the featured image as a shortcode using the following [rss_feed_item_image]
    • Number of image in feed content - Which image should be used as the featured image. "1" means first image, "2" the second and so on. This option affects all items of current feed.
    • Exclusive use of default image - When this option is selected default image will be set as featured image despite the presence of any image in the fetched article.
  • Disable security filters - Some content requires the disabling of security filters

Altering the Template

The Template can be altered using the shortcodes shown in the panel or with some manually entered text. You can also apply the relevant parameters to each of the shortcodes.

Tip 1 - Making sure the plugin imports paragraphs and line breaks

When including the content of the post, consider using [rss_feed_item_content] instead of [rss_feed_item_description].

That's because of the content  [rss_feed_item_content] "understands" paragraphs and line breaks.

[rss_feed_item_description], on the other hand, imports the content in a single line as raw text.

Additionally, you can choose to "strip all HTML tags" for both description and content (check RSS Post Importer - Set Up - 3) Choosing What's Important in the Post)

Tip 2 - Link To Source

If you would like to create a link with the original title and URL, you can use the shortcodes inside an HTML code.

  • Example with the visual editor:
  • Example with HTML code:
    <a href="[rss_feed_item_permalink]">[rss_feed_item_title]</a>

Tip 3 - Showing Video From YouTube Feeds

If you are working with a YouTube RSS feed and would like to automatically show the videos, add the  [rss_feed_item_permalink] shortcode into the content. 

In the resulting post, the shortcode will be replaced with the actual video.

Excerpt

At the end of the panel, you will also find the Excerpt field. The excerpt is a hand-crafted summary of the content ( learn more).

By default, it contains a shortcode to set a Word Limit. You can alter the number in the shortcode to define how many words will be captured as the excerpt. So, for instance, the following shortcode will import 30 words from each post as their excerpts:

[rss_feed_item_description trim_words=30]

Take note that every post will follow this rule. 

Don't Forget To Save!

After completing the configuration for the Feed remember to Save. Either as a Draft by clicking Save Draft or as a Published Feed by clicking Publish on the upper right of the page.

Important

The feed does not appear immediately - it takes some time for fetching the data.

Result on the Front-end:

Managing RSS Feeds

To manage all created RSS feeds navigate to  Admin Dashboard → CM RSS Post Importer Pro → RSS Feeds.

There you can see all created RSS feeds, filter them by dates and categories, do bulk actions and view Processing Log.

By hovering on any RSS feed you can also do the following:

  • Edit
  • Trash
  • Reimport
  • Enable/Pause fetching
  • Duplicate

Fetch History

One more feature is Fetch History. Fetch History displays a list of all the posts imported by the RSS Post Importer Plugin.

To see it, navigate to  Admin Dashboard → CM RSS Post Importer Pro → Fetch History

The post's Title, Status, Fetch Date and Processing log information are displayed.

You can also View, Edit or Trash Final Post by hovering on needed feed.

End Result

In result we have fetched all news from RSS Feed since the definite date and these news are relevant to keywords that we've chosen.

Use Case Front-End


More information about the RSS Post Importer WordPress Plugin

Other WordPress products can be found at CreativeMinds WordPress Store

Let us know how we can Improve this Product Documentation Page

To open a Support Ticket visit our support center
Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us