PHP if elseif problem
-
I’m modifying a theme to better suite my needs, but run into a mysterious problem. In my sidebar.php I have:
<?php if (is_front_page() and dynamic_sidebar('Home Page')) { } elseif (is_page() and dynamic_sidebar('Page Default')) { } elseif (is_single() and dynamic_sidebar('Single Post')) {?} else { } ?>
But for some reason this does not work. WordPress does not even compile (if that is the correct term) my sidebar.php when it looks like that. But when I remove one of the lines beginning with “elseif” statements, sidebar.php compiles and theme works nicely (only missing the removed functionality).
Could someone please tell me what is wrong with my code.
Viewing 8 replies - 1 through 8 (of 8 total)
Viewing 8 replies - 1 through 8 (of 8 total)
- The topic ‘PHP if elseif problem’ is closed to new replies.