Support » Themes and Templates » Warning in theme preview

  • danceswithcats


    I just downloaded and installed the Platform theme, and when I selected “Preview” I got the following error:

    Warning: Invalid argument supplied for foreach() in /home/content/j/a/n/janea/html/wp-content/themes/platform/core/library/class.template.php on line 215

    I’d love to use this theme, but I’m afraid of crashing my entire site if I do. Any ideas what’s going on here?

    I saw the exact same question on the Platform Pro support site, but because I haven’t bought any of their products — nor do I intend to at the moment — I have no way to see any feedback there. The question is still marked as unresolved on that forum, too.

    Thanks everyone.

Viewing 8 replies - 1 through 8 (of 8 total)
  • Michael


    Forum Moderator

    this has probably to do with either categories or tags not yet being created for the new site.

    if you like, you could locate this file ‘/core/library/class.template.php’ in your ‘platform’ theme folder, and paste the code into a and post the link to it here; someone might have a look at it.



    Thanks! Although the site does have tags and categories (I’m using the Suffusion theme currently), it’s possible that the preview wasn’t able to find that information.

    (Sorry, coding failboat alert–the link is in the next post down.)



    Here’s the pastebin code from my ‘/core/library/class.template.php’ file in the Platform theme folder. The site currently does have categories and tags (I’m using the Suffusion theme right now), but maybe the preview didn’t read them?

    Class Template PHP file



    Forum Moderator

    with tags and cats was only a guess;
    this ‘foreach’ warning seems to have to do with some (print) areas which you would set in the theme options – looks unsuspicious enough to me.



    Try re-downloading the theme files.. has been having issues with incomplete files in some of the template files.

    This specific error is because the theme isn’t able to read a function that exists in the
    config.templates.php file.

    Also, check and make sure the file ‘config/config.templates.php’ file is in the theme.

    (If not, this is def. a problem with the servers.)

    I am having the same problem. I checked the directory and the file exists. Any other ideas? Thank you, DMK

    I’m having the same problem, has anyone figured this out?

    Upgrading to PHP 5.x solved it.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Warning in theme preview’ is closed to new replies.