Results 1 to 5 of 5

Thread: Error message updating functions.php file

  1. #1
    Join Date
    Feb 2009
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Error message updating functions.php file

    When I attempt to update my function.php file in wordpress kubrick I get the following error message:

    Parse error: syntax error, unexpected '}' ... on line 26

    The code is...

    PHP Code:
    <?php
    /**
     * @package WordPress
     * @subpackage Default_Theme
     */

    if ( function_exists('register_sidebar') )
        
    register_sidebar(array(
            
    'before_widget' => '<li id="%1$s" class="widget %2$s">',
            
    'after_widget' => '</li>',
            
    'before_title' => '<h2 class="widgettitle">',
            
    'after_title' => '</h2>',
        ));

    /** @ignore */
    function kubrick_head() {
        
    $head "<style type='text/css'>\n<!--";
        
    $output '';
        if ( 
    kubrick_header_image() ) {
            
    $url =  kubrick_header_image_url() ;
            
    $output .= "#header { background: url('$url') no-repeat bottom center; }\n";
        }
        if ( 
    false !== ( $color kubrick_header_color() ) ) {
            
    $output .= "#headerimg h1 a, #headerimg h1 a:visited, #headerimg .description { color: $color; }\n";
        }
        if ( 
    false !== ( $display kubrick_header_display() ) ) {
            
    $output .= "#headerimg { display: $display }\n";
        }
        
    $foot "--></style>\n";
        if ( 
    '' != $output )
            echo 
    $head $output $foot;
    }

  2. #2
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Works for me, but you should probably end your PHP block with a ?>. Which is line 26?
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  3. #3
    Join Date
    Apr 2008
    Location
    Limoges, France
    Posts
    395
    Thanks
    13
    Thanked 61 Times in 61 Posts

    Default

    You're sure the error is for this file? Post the whole error message if you can.

  4. #4
    Join Date
    Feb 2009
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    The entire error message is...

    Parse error: syntax error, unexpected '}' in /home/nowth3/public_html/wp-content/themes/default/functions.php on line 26

  5. #5
    Join Date
    Feb 2009
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Hey Twey,
    I am assuming this is line 26...

    PHP Code:
    if ( false !== ( $display kubrick_header_display() ) ) { 

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •