Custom field with price informations
-
Hello Greg,
in my add ad form i have created a dropdown field to allow users to select if the price is negotiable or not (and when its not filled by user than leave it blank).
This informatione i want to display in the list-item.php next to the price.
<?php $price = get_post_meta( get_the_ID(), "adverts_price", true ) ?> <?php if( $price ): ?> <div class="advert-price"><?php echo esc_html( adverts_get_the_price( get_the_ID(), $price ) ) ?></div> <?php elseif( adverts_config( 'empty_price' ) ): ?> <div class="advert-price adverts-price-empty"><?php echo esc_html( adverts_empty_price( get_the_ID() ) ) ?></div> <?php endif; ?>
But I did not find the right shortcode to insert the new custom field.
Can you please give a little tutorial, how to insert custom fields into the list item?
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Custom field with price informations’ is closed to new replies.