Okay
  Print

Automatically fetch/import new episodes on your website from your existing Podcast hosting

With Sonaar, you have the option to import your RSS feed at your choosen interval by using a "Cron Job".


If you run Sonaar v4.19.2 or an higher version, you must add a Cron Event

1. Install WP Crontrol plugin and activate it.

2. Go to WP-Admin > Tools > Cron Events > Add Cron Event

3. Use these settings:

Hook name: sonaar_rssimport

Arguments: 

[{"cat_id":"99","feed_url":"https://yourpodcasthosting.com/rss.xml"}]

See screenshot: https://d.pr/i/W87woA

4. Replace the number 99 by your Podcast Episode category ID. To find out your podcast category ID, see screenshot: https://d.pr/i/6kAt67

5. Replace 'https://yourpodcasthosting.com/rss.xmlby your own RSS URL. Keep the double quotes!

6. Set your next run and its reccurance.

7. Click Add Event.

* If you want to force importing the new episodes right away, you can always manually trigger the cron job by hover the cron title and click RUN NOW. See screenshot https://d.pr/i/SpSoSd

* If your new episodes do not import, make sure they are not already present in WP-Admin > Podcast Episodes and also that they are NOT in your trash. See screenshot https://d.pr/i/FDadFF

If you run Sonaar v. 4.19.1 or lower, you must add a PHP Cron Event


1. Install WP Crontrol plugin and activate it.

2. Go to wp-admin > tools > Cron Events > Add PHP Cron Event

3. Add this code in "Add PHP Cron Event tab"

// Set up the environment
if ( ! defined('ABSPATH') ) {
    require_once( dirname( dirname( dirname( dirname( __FILE__ ) ) ) ) . '/wp-load.php' );
}
require_once( ABSPATH . 'wp-admin/includes/admin.php' );
define( 'WP_LOAD_IMPORTERS', true );
require_once IRON_MUSIC_DIR_PATH . 'includes/rss-importer/class-podcast-rss-import.php';
// run function
Sonaar_RSS_Import::run_import( 'https://yourpodcasthosting.com/rss.xml', $import_category = 39, $import_attachments = true, $import_settings = false );

4. Replace 'https://yourpodcasthosting.com/rss.xmlby your own RSS URL. You must keep the single quotes

5. Replace the number 39 in $import_category = 39  by your Podcast Episode category ID. To find out your podcast category ID, see screenshot: https://d.pr/i/6kAt67

6. set your next run and its reccurance.

7. Save it

* If your new episodes do not import, make sure they are not already present in WP-Admin > Podcast Episodes and also that they are NOT in your trash. See screenshot https://d.pr/i/FDadFF

Here is a screenshot to illustrate the setup of a PHP Cron Event