Support » Themes and Templates » Custom Template Install Problem: Theme.php line 180

  • Resolved golds30


    I’m installing a custom template that I coded and I keep getting this error message upon install. I think I have some incorrect or missing template data. Can you help?

    Warning: file(/home/nesto4/public_html/photo/wp-content/themes/AG-Photo/style.css) [function.file]: failed to open stream: No such file or directory in /home/nesto4/public_html/photo/wp-includes/theme.php on line 180
    Warning: implode() [function.implode]: Bad arguments. in /home/nesto4/public_html/photo/wp-includes/theme.php on line 180

Viewing 5 replies - 1 through 5 (of 5 total)
  • I’m no expert on php warning messages, but I think you’re right about missing some template data or some template data got mixed up.

    Have you tried opening up the file(s) in question in a text editor and looking at line 180 to see what’s there (or not there)?

    I’m no php warning expert either.

    I did look at the theme.php file and here’s the line that it shows:

    $theme_data = implode( '', file( $theme_file ) );

    It seems to be keying in on my style sheet, but I’m not sure what it is trying to tell me. I have the theme info plugged into my style sheet, and the CSS is just sitting in the root folder like it should.

    Looks like it’s referring to a call for the css file here: /home/nesto4/public_html/photo/wp-content/themes/AG-Photo/style.css on line 180 in this /home/nesto4/public_html/photo/wp-includes/theme.php php file.

    Might want to check line 180 to see if it’s pointing to that file correctly. Also it appears that there’s a function call that’s not completely right.

    As usual, simple things make the difference, and if you search long enough you find the simple thing you did wrong.

    The 180 error referred to the way I had zipped the files and was trying to upload. The theme folder was sitting inside of another folder, so essentially there was no index.php in the root folder (I’m an idiot).

    I copied the default themes CSS file call, and I think that fixed the function issue.

    Thanks for the help!



    Thanks for this solution. I want to add that this problem easily happens when zipping up the folder that a theme’s files are in, rather than individually selecting all the files to be zipped.

    Basically, anytime a theme’s index page (not “wp-content/themes/index.php”, but rather “wp-content/themes/’THEMENAME’/index.php”) reside inside multiple folders, you will get this error.

    Thanks again!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Custom Template Install Problem: Theme.php line 180’ is closed to new replies.