Hi,
Im using the following code to check a custom field's value so i can change css :
<?php $custom_field = array();
if( osc_count_item_meta() >= 1 ) {
while ( osc_has_item_meta() ) {
if(osc_item_meta_value() !="") {
$custom_field_name[osc_item_meta_slug()] = osc_item_meta_name();
$custom_field_value[osc_item_meta_slug()] = osc_item_meta_value();
}
}
} ?>
<?php $tipos = trim($custom_field_value['typos_aggelias']); ?>
<?php if ($tipos == 'Πώληση') { ?>
<div class="eidos_aggelias_polisi"><strong><?php echo $custom_field_value['typos_aggelias'] ;?></strong></div>
<?php } ?>
<?php if ($tipos == 'Ζήτηση') { ?>
<div class="eidos_aggelias_zitisi"><strong><?php echo $custom_field_value['typos_aggelias'] ;?></strong></div>
<?php } ?>
<?php if ($tipos == 'Ανταλλαγή') { ?>
<div class="eidos_aggelias_antallagi"><strong><?php echo $custom_field_value['typos_aggelias'] ;?></strong></div>
<?php } ?>
Even though $tipos is 'Πώληση' ( I can see it in every ad if I echo $tipos before the if statements), the echo in first if is not triggered.
Anyone have an idea why its not working?
George