[wp-testers] Wordpress 2.5x If else conditions

DD32 wordpress at dd32.id.au
Thu May 1 13:21:51 GMT 2008


Double and triple check you're setting them as globals.
Globalise before in the template, And globalise in the comments template  
too

On Thu, 01 May 2008 22:04:26 +1000, Daniel Lindén <admin at vebut.se> wrote:

> 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
> _______________________________________________
> wp-testers mailing list
> wp-testers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-testers
>




More information about the wp-testers mailing list