I’ve been used WordPress for two of my websites and I had no problem with displaying the “last n comments” and the “most commented” on the main page. However for my third site with WordPress, a problem which I can’t understand occurs in that case. When I put the script to “my-hacks.php” and call the hack from the main page, it gives the following message:
” Warning: Invalid argument supplied for foreach() in c:\apache\htdocs\yverkac\my-hacks.php on line 59 “
According to this message I checked the line 59, but there seems to be no problem. Here is the line 59:
” foreach ($posts as $post) “
Now, do you have any idea why it gives this message instead of showing the most recent comments or the last n comments (the same error occurs for each of these hacks.)
Thank you for your help.
- The topic ‘Problem with comments’ is closed to new replies.