So what i would like to do is order in some CSS depending on the value of a custom field.
The code below just says that if there is ANY value, do X, else do nothing…
<?php $pageNumbered=get_post_meta($post->ID, 'page-number', true); ?>
<?php if ( $pageNumbered ) : ?>
<div class="page-number left">
<?php echo get_post_meta($post->ID, "page-number", true); ?>
</div>
<?php else : ?>
<?php endif; ?>
…what i want to do is say if the value is X do Y, if it is Z do XY etc etc…
Thanks guys!
Sorry but it’s not clear what you want to do. From what I understand is you simply want to use an elseif statement:
If you can edit you question to be clearer then I might be able to help more.