• I seem to have busted my WP site (www.lyriquest.com) while editing the functions.php file. Replacing the functions.php with the original has no effect.

    The error message:
    Warning: dir(TEMPLATEPATH/) [function.dir]: failed to open dir: No such file or directory in /home/content/26/9196326/html/wp-includes/functions.php on line 100

    Fatal error: Call to a member function read() on a non-object in /home/content/26/9196326/html/wp-includes/functions.php on line 101

    Here is the section of code it is trying to execute:

    /*
    Get Available CSS
    */
    function get_availableCss(){
    $result = array();
    $dir = dir(TEMPLATEPATH.”/”); (This is line 100)
    while (false !== ($file = $dir->read())) {
    if(ereg(“\.css”, $file, $r)){
    $result[] = $file;
    }
    }
    $dir->close();
    return $result;
    }

    The TEMPLATEPATH displayed in the error msg appears to be wrong but I can’t seem to figure out how to fix it.

    Any help would be GREATLY appreciated!

    Dan

    [ Duplicate https://www.ads-software.com/support/topic/how-to-edit-templatepath?replies=1 – Closing. Please continue with the original topic. ]

  • The topic ‘TEMPLATEPATH Error’ is closed to new replies.