WordPress.org

Support

Error message

  • Hi,

    I was trying to add a second sidebar and added this to my function.php file:

    <?php
    if ( function_exists(‘register_sidebar’) )
    register_sidebar(array(‘name’=>’sidebar1’,
    ‘before_widget’ => ”,
    ‘after_widget’ => ”,
    ‘before_title’ => ‘<h4>’,
    ‘after_title’ => ‘</h4>’,
    ));
    register_sidebar(array(‘name’=>’sidebar2’,
    ‘before_widget’ => ”,
    ‘after_widget’ => ”,
    ‘before_title’ => ‘<h4>’,
    ‘after_title’ => ‘</h4>’,
    ));
    ?>

    I got this error message and cannot get back to my admin area.

    Parse error: syntax error, unexpected ‘<‘ in /home/babyfeva/public_html/blog/wp-content/themes/girl/functions.php on line 11

    HELP!!! I am a beginner.

Viewing 2 replies - 1 through 2 (of 2 total)
  • tomontoast
    Member

    @tomontoast

    You don’t need the first <?php since you are already in a php block. Try adding just

    if ( function_exists('register_sidebar') )
    register_sidebar(array('name'=>'sidebar1',
    'before_widget' => '',
    'after_widget' => '',
    'before_title' => '<h4>',
    'after_title' => '</h4>',
    ));
    register_sidebar(array('name'=>'sidebar2',
    'before_widget' => '',
    'after_widget' => '',
    'before_title' => '<h4>',
    'after_title' => '</h4>',
    ));
    ?>

    That should work now!

    splatcard
    Member

    @splatcard

    Hello everytime now someone submits a comment, it still works but takes the user to this page with the message displaying:

    Warning: _() expects exactly 1 parameter, 2 given in /home/splat/public_html/wp-content/themes/bueno/404.php on line 12

    I think the damage was done changing some code, but as I am very new I dont no what to change to fix it would really appreciate your help on the matter, because I need to get it sorted asap, my blogs domain is http://www.studentspayless.com

    Thanks alot

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Error message’ is closed to new replies.