Title: Error message
Last modified: December 14, 2016

---

# Error message

 *  Resolved [ke11yred](https://wordpress.org/support/users/ke11yred/)
 * (@ke11yred)
 * [9 years, 5 months ago](https://wordpress.org/support/topic/error-message-566/)
 * Hi,
 * After installing the Sermon.net plugin for WordPress, and displaying it on our
   website via shortcode, I’m getting an error message that reads:
 * Warning: Invalid argument supplied for foreach() in /home/spbapt5/public_html/
   wp-content/plugins/display-sermonnet/includes/shortcodes.php on line 55
 * Here is the section of code that’s yielding that message:
 * `$wt_sermonnet_show_episodes = array();
    if ( $wt_playlist_id == ‘all’ ) { $wt_sermonnet_show_episodes
   = $wt_50_sermonnets_fulldata; } else { $wt_sermonnet_playids = array(); foreach(
   $wt_recent_sermonnet_all as $wt_sermonet_playlists ) { $wt_sermonnet_playids[
   $wt_sermonet_playlists->playlistId ][] = $wt_sermonet_playlists->id; }
 *  $wt_show_ids = array();
    foreach ( $wt_sermonnet_playids[ $wt_playlist_id ] 
   as $wt_selected_id ) { $wt_show_ids[ $wt_selected_id ] = $wt_selected_id; }
 *  $wt_sermonnet_show_episodes = array_intersect_key( $wt_50_sermonnets_fulldata,
   $wt_show_ids );
    }’
 * I’m running the latest version of WordPress (4.7) and the Enfold Theme. Please
   advise.
 * Thanks,
 * Kelly

Viewing 1 replies (of 1 total)

 *  Plugin Author [Michael](https://wordpress.org/support/users/mgyura/)
 * (@mgyura)
 * [9 years, 5 months ago](https://wordpress.org/support/topic/error-message-566/#post-8554110)
 * Kelly,
    Thank you for your message. Have you linked your sermon.net account credentials
   to your website yet? YOUR-DOMAIN/wp-admin/options-general.php?page=wt-sermonnet-
   settings
 * If so, can you please send the link to the page of where you’re getting the warning
   at?

Viewing 1 replies (of 1 total)

The topic ‘Error message’ is closed to new replies.

 * ![](https://ps.w.org/display-sermonnet/assets/icon-256x256.png?rev=1544749)
 * [sermon.net display](https://wordpress.org/plugins/display-sermonnet/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/display-sermonnet/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/display-sermonnet/)
 * [Active Topics](https://wordpress.org/support/plugin/display-sermonnet/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/display-sermonnet/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/display-sermonnet/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Michael](https://wordpress.org/support/users/mgyura/)
 * Last activity: [9 years, 5 months ago](https://wordpress.org/support/topic/error-message-566/#post-8554110)
 * Status: resolved