Forums

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

  1. mandawahoo
    Member
    Posted 6 months 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 1 month 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.

Reply

You must log in to post.

About this Topic