WordPress.org

Ready to get started?Download WordPress

Forums

Error message (3 posts)

  1. huvecs
    Member
    Posted 5 years ago #

    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.

  2. tomontoast
    Member
    Posted 5 years ago #

    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!

  3. splatcard
    Member
    Posted 4 years ago #

    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

Topic Closed

This topic has been closed to new replies.

About this Topic