I’m having difficulty with setting up a second sidebar for my WordPress theme.
Here’s the code for function.php:
<?php
if(function_exists('register_sidebar')){
register_sidebar(array(
'before_widget'=>'<li>',
'after_widget'=>'</li>',
'before_title'=>'<h2>',
'after_title'=>'</h2>',
))
;
}
?>
<?php
if(function_exists('register_sidebar')){
register_sidebar('home'array(
'before_widget'=>'<li>',
'after_widget'=>'</li>',
'before_title'=>'<h2>',
'after_title'=>'</h2>',
))
;
}
?>
This is the error I’m receiving when I try to access the widget options page in admin:
Parse error: syntax error, unexpected
T_ARRAY in
C:\xampp\htdocs\tlc\wp-content\themes\tlc\functions.php
on line 14
to give it a name you use this syntax
not what you wrote
see this for more info
http://codex.wordpress.org/Function_Reference/register_sidebar