• 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)
  • 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

    (@alchymyth)

    hopefully, the theme’s developer will take care of that at some point.

    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: https://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.