Title: php warning in header
Last modified: August 21, 2016

---

# php warning in header

 *  [Michael](https://wordpress.org/support/users/alchymyth/)
 * (@alchymyth)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/php-warning-in-header/)
 * warnings message appears if no ‘featured’ posts are selected:
 * >  Warning: Invalid argument supplied for foreach() in C:\Xammp\xampp\htdocs\
   > wordpress\wp-content\themes\academica\header-image.php on line 15

Viewing 3 replies - 1 through 3 (of 3 total)

 *  [Sunil Pandey](https://wordpress.org/support/users/sunilpanday/)
 * (@sunilpanday)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/php-warning-in-header/#post-3790245)
 * I have also installed in my blog dealmyblog.com…
    i am looking same problm . 
   Can any one help me please to resolve this problm
 * Warning: Invalid argument supplied for foreach() in /home1/sayan163/public_html/
   deadonblog.com/wp-content/themes/academica/header-image.php on line 15
 *  Thread Starter [Michael](https://wordpress.org/support/users/alchymyth/)
 * (@alchymyth)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/php-warning-in-header/#post-3790246)
 * hopefully, the theme’s developer will take care of that at some point.
 *  [Sunil Pandey](https://wordpress.org/support/users/sunilpanday/)
 * (@sunilpanday)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/php-warning-in-header/#post-3790247)
 * I have resolved it by just commenting few lines by which i was facing this
    problm.
   Now every thing is ok.
 * Just change the few thing in the header-image.php file.
 * /**foreach ( $featured as $key => $_featured ) :
    if ( ! has_post_thumbnail( 
   $_featured->ID ) ) unset( $featured[ $key ] ); endforeach;*/
 * This was just because if this foreach loop just comment it..it will be operate
   Correctally.
 * check my blog: [http://deadonblog.com/](http://deadonblog.com/) it is being operated
   correctally

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘php warning in header’ is closed to new replies.

 * ![](https://i0.wp.com/themes.svn.wordpress.org/academica/2.1.3/screenshot.png)
 * Academica
 * [Support Threads](https://wordpress.org/support/theme/academica/)
 * [Active Topics](https://wordpress.org/support/theme/academica/active/)
 * [Unresolved Topics](https://wordpress.org/support/theme/academica/unresolved/)
 * [Reviews](https://wordpress.org/support/theme/academica/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Sunil Pandey](https://wordpress.org/support/users/sunilpanday/)
 * Last activity: [12 years, 10 months ago](https://wordpress.org/support/topic/php-warning-in-header/#post-3790247)
 * Status: not a support question