WordPress.org

Ready to get started?Download WordPress

Forums

[Plugin: Tweetbacks] Getting error: Warning: Invalid argument supplied for foreach()... (2 posts)

  1. mandawahoo
    Member
    Posted 5 years ago #

    When I put in the last snippet of code:
    <?php foreach ($comments_by_type as $comment_type) {
    echo "

      ";
      foreach ($comment_type as $comment) {
      ?>

    • <?php comment_author_link() ?>: <?php comment_text() ?>
    • <?php
      }
      echo "

    ";
    }?>

    I receive the following error:
    Warning: Invalid argument supplied for foreach() in /home/content/g/i/b/gibsona1/html/wordpress/wp-content/themes/molded/comments.php on line 56

    Any suggestions?

  2. Shane G
    Member
    Posted 4 years ago #

    Hi,

    It is due to not proper designing the theme code. Change your theme to default and have a check with comment. It should be working fine.

    Also check with disabling all the plugins.

    Thanks,

    Shane G.

Topic Closed

This topic has been closed to new replies.

About this Topic