Php If statements in WP
Posted: Thu Nov 18, 2010 5:02 am
I've trawled the Wordpress forums but there isn't really an answer to my question.
I've got an If statement which uses an Id which you can call with wpsc_vargrp_id(); however it seems to want to ignore the if statement.
I echo'd the wpsc_vargrp_id and got 1, 2 and 4. Its the group using id 4 which I want to display differently with the If statement.
So I added:
But it just ignored the if statement and just uses the else.
Since I can't get an answer on the WP forums I was hoping someone here could help
Regards,
Aravona
I've got an If statement which uses an Id which you can call with wpsc_vargrp_id(); however it seems to want to ignore the if statement.
I echo'd the wpsc_vargrp_id and got 1, 2 and 4. Its the group using id 4 which I want to display differently with the If statement.
So I added:
Code: Select all
if (wpsc_vargrp_id() == '4') {
Display vargrp 4
}
else {
display all other vargrps
}
Since I can't get an answer on the WP forums I was hoping someone here could help
Regards,
Aravona