• Resolved spandabel

    (@spandabel)


    Hi!

    Suddenly I got the message:

    Parse error: syntax error, unexpected T_CLASS in /home/spandabe/public_html/wp-content/themes/modularity-lite/functions.php on line 72

    when opening my site http://www.spandabel.dk

    I only changed things in header.php, not in functions.php!

    This is how it looks in my functions.php around line 72:

    // The header business begins here:
    
    // No CSS, just IMG call
    define('HEADER_TEXTCOLOR', '');
    define('HEADER_IMAGE', '');
    define('HEADER_IMAGE_WIDTH', 950);
    define('HEADER_IMAGE_HEIGHT', 250);
    define( 'NO_HEADER_TEXT', true );
    
    function modularity_admin_header_style() {
    ?>
    <style type="text/css">
    #headimg {
    	height: <?php echo HEADER_IMAGE_HEIGHT; ?>px;
    	width: <?php echo HEADER_IMAGE_WIDTH; ?>px;
    }

    Does anybody have an idea what has happened??
    Thanks.
    – Anne

    btw – the theme I’m using is Modularity Lite

Viewing 9 replies - 1 through 9 (of 9 total)
  • Hello,

    Could you post all the code from your functions.php and header.php files? (Use pastebin, or similar).

    Ross

    Thread Starter spandabel

    (@spandabel)

    Thanks for responding.
    I’ve never used pastebin, but here’s a link to the functions.php
    http://pastebin.com/t167ju6M

    I cannot get to the header.php. In fact I’m “locked” in the functions.php, everytime I update I get the error, and the only thing I can do then is to go back in my browser to the functions.php

    Hello,
    You may access to your header.php using ftp & modify the file .

    There doesn’t appear to an error in that code.

    As Abdul suggests, you should be able to access the functions.php and header.php files via FTP, or by using the file manager in your hosting control panel.

    Thread Starter spandabel

    (@spandabel)

    So I managed to find my header.php using filezilla.
    here it is:

    http://pastebin.com/KsqbD6UM

    Could you post the code from functions.php accessed via FileZilla?

    Thread Starter spandabel

    (@spandabel)

    Sure! Here it is:

    http://pastebin.com/wDbHtU5f

    There are several errors in the include_search_box function in your functions.php file. That function should probably be as follows:

    function include_search_box( $items, $args ) {
    	// only display search box on our primary menu
    	if( 'primary' === $args->theme_location )
    		$items .= '<li class="menu-item menu-item-search">' . get_search_form( false ) . '</li>';
    
    	return $items;
    }
    
    add_filter( 'wp_nav_menu_items', 'include_search_box', 10, 2 );
    Thread Starter spandabel

    (@spandabel)

    You just made my day!!! That search-box wasn’t even supposed to be there – or anywhere.
    Thank you so much for your guidance and help!

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Error in functions.php. Please help!!’ is closed to new replies.