WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Custom Template Install Problem: Theme.php line 180 (6 posts)

  1. golds30
    Member
    Posted 4 years ago #

    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
  2. EMG
    Forum Volunteer
    Posted 4 years ago #

    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)?

  3. golds30
    Member
    Posted 4 years ago #

    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.

  4. dtiger2k
    Member
    Posted 4 years ago #

    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.

  5. golds30
    Member
    Posted 4 years ago #

    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!

  6. alh
    Member
    Posted 4 years ago #

    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!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.