• Im Trying to get custom fields to work in a flow of logic below

    If author do nothing

    If not

    Check price? if price show price and tag

    if not

    Check reviewazon price? if price

    show reviewazon price and tag

    If not

    Show out of stock banner.

    This is my code so far,

    <?php if(get_post_meta($post->ID, 'Authors', true) == '') { ?>
    
    			<?php $price = get_post_meta($post->ID, 'price', true);
    			 if ( $price ) {
     echo '<span class="price-tag">	';
    		}
    else {
    echo '<span class="band2 outofstock2"></span>';
    }
    ?>	
    
    			<?php if(get_post_meta($post->ID, 'price', true) != "") { ?>
    <span><?php echo $Price = get_post_meta($post->ID, 'price', true); ?></span>
    <?php } ?>
    
    <?php } ?>

    And anyone help get me what I want? I’ve whacking my brains for days

  • The topic ‘Custom fields in logical order’ is closed to new replies.