How to Import RSS into Pugpig

When importing RSS feeds into Pugpig we recommend using the FeedWordPress module. It is available here. It is important you change the setting to ensure Permalinks point to the local version, not the remote version. This document outlines what to consider if feed import is important to you and how to support it if you are handling your own servers and setup (applicable to Pugpig Connect, Pugpig Toolkit customers). Pugpig Express and Pugpig Professional products support RSS feed import, you can find out about this here

 Things to consider for feed imports:

  • You will need to decide at what frequency your feed needs to polled and your content is updated
  • Ideally the URL to the feed doesn't change. While it is possible to add multiple feeds, it is much simpler if there is a single feed
  • If your app is edition based the feed should always contain at least all the content from the latest edition's
  • On Pugpig Professional, if you wish the editions to be created automatically, there will need to be a tag in the feed that tells us what edition an item belongs to
  • If order content sits in is important you will need to make sure there is some metadata in your feed that defines this
  • If your content needs to be mapped into sections you will need to make sure each item in your feed has been assigned a category 
  • If items in your feed have been assigned multiple categories and items will only be mapped to one section in you app content the feed will need to include some indicator of what the top level category is

Adding categories for edition creation

Handling images in the feed, FeedWordPress currently does not allow you to add custom categories or tags from the feed, but it allows you to create custom properties. As our module require tags or categories for edition control, we recommend importing the field as a custom property and converting it to a category on save. Do this by implement a hook in your extension module.

add_action('save_post', 'mymodule_save_post', 10);
function mymodule_save_post($post_id){
  $post = get_post($post_id);
  if (!isset($post)) return;
  if ($post->post_type == "revision") return;
  if ($post->post_type == "attachment") return;
  if(  ( defined('DOING_AUTOSAVE') && DOING_AUTOSAVE ) || $post->post_status == 'auto-draft' ) return;  
  $issue = get_post_meta($post_id, "issue_number");
  if (isset($issue[0])) {
    wp_set_post_tags( $post_id, $issue[0], true );
Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request


Powered by Zendesk