WordPress.org

Support

Support » How-To and Troubleshooting » Warning if no posts/articles

Warning if no posts/articles

  • I deleted all the posts I had on a blog, and where all the links usually are I had this:

    Warning: Invalid argument supplied for foreach() in /pathtoblog/BlogName/wp-includes/template-functions-category.php on line 304

    So, basically I can’t have an empty blog.

    Any thoughts on this?

Viewing 4 replies - 1 through 4 (of 4 total)
  • It’s expecting a post …… it’s designed to have a post so it expects that not to be empty.
    That said, I think this has been fixed.

    Why would you want an empty blog ?
    And you could delete the category listing from the menu ?

    Why would you want an empty blog ? So, I can hand it over to the client.
    And you could delete the category listing from the menu ? Listing replaced by the error message.

    I have always left a message there, sometimes even replacing it with an example that illustrates the use of the quicktags. Gives them something to look at and playwith 🙂

    I can see your point, but then part of the installation process is not just creating the database, but also cheacking that tables can be made and posted to without error. A simple initial post achieves that.

    OK, but seem silly to have an error there. No other solution seems to do it.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Warning if no posts/articles’ is closed to new replies.
Skip to toolbar