Conditional tag and parse error
-
Hi !
I’m trying to set different sidebars according to which page the user is on.
I did that :<? if is_page('8') { function_exists('dynamic_sidebar') && dynamic_sidebar(2) } if is_page('7') { function_exists('dynamic_sidebar') && dynamic_sidebar(1) } endif; ?>
and on my page.php template,
<? get_sidebar(); ?>
I get a parse error, unexpected T string on line 2 on the sidebar.php.
“Parse error: syntax error, unexpected T_STRING, expecting ‘(‘ “
Can’t understand what’s wrong. Help would be greatly appreciated !
Viewing 7 replies - 1 through 7 (of 7 total)
Viewing 7 replies - 1 through 7 (of 7 total)
- The topic ‘Conditional tag and parse error’ is closed to new replies.