[wp-testers] Wordpress 2.5x If else conditions

Daniel Lindén admin at vebut.se
Thu May 1 12:04:26 GMT 2008


Hi!
I've been trying to declare variables in my own template for pages to get different styles of my comment section. In my template (guestbook.php) I declare a $gb_post variable (set to true) just above the comments_template() caller.
When checking this variable in comments.php it still equals true but my if / else statment does not apply.

if ($gb_post == true) { do this }
else { do this }

Does anybody know what the problem might be?
I'm a rookie with wordpress modification but I have about 4 years of experiance with PHP and this problem is to me ridiculus, as this is very basic and shouldn't happen.

Best,
Daniel Lindén


More information about the wp-testers mailing list