• Hello

    I need some serious help on how I can possibly

    Display the same Custom Field Value twice on the main page but with different styles.

    Please take a look at faucetsnthings.com/linh
    I want the items to appear on top in featured and on the left-hand side. There are only 2 categories I’m working with. Essentially my client wants to be able to pull the same custom field value , and display it differently depending on the category the post item is in. So for category(1) there will be a black background and for category(2) there will be a blue background. They will share the same custom field value “cp_price”

    The code I’m using is this

    <div id="list">
    <div class="prev">
    <?php if ( in_category('4') ): ?>
    <div class="descripz">
    <a style="color:white;text-decoration:none;" href="<?php the_permalink() ?>">
    <?php echo get_post_meta($post->ID, cp_street, true); ?>
    </a>
    <?php endif; ?>
    <?php if ( in_category('1') ): ?>
    <div class="descripz">
    <a style="color:white;text-decoration:none;" href="<?php the_permalink() ?>">
    <?php echo get_post_meta($post->ID, cp_street, true); ?>
    </a>
    <?php endif; ?>
    
    </div>
    </div>
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Displaying The same Custom Field Value twice’ is closed to new replies.