Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Greg Winiarski

    (@gwin)

    Hi, the mark as sold field you can add as a custom field like explained here https://wpadverts.com/documentation/custom-fields/, changing Price to SOLD will additionally require modifying the Ads list template file wpadverts/templates/list-item.php

    Hi Greg

    Me to want o incorporate this option in my website. If it isn’t too much to ask for, can you help in modifying the list-item.php to change the price tag to “Sold”

    Thanks.

    Plugin Author Greg Winiarski

    (@gwin)

    Hi, do you have some custom field which should be checked when user sells the item? Or in other words how WPAdverts should now the item has been sold?

    BTW. Your second question was somehow added in a thread https://www.ads-software.com/support/topic/comments-in-single-page?replies=5 which is closed, i cannot add there a reply.

    Hi

    Thank you for your reply. Yes, I am planning to create a custom checkbox as explained here in your documentation : https://wpadverts.com/documentation/custom-fields/

    User will mark this check box if the item is sold already, accordingly WP adverts changes the value in price to “Sold”.. This is what i am thinking.

    And yeah, my second question have been solved (added to function.php). Thanks. Your support is awesome.

    Plugin Author Greg Winiarski

    (@gwin)

    Once you will have the custom field, you will need to open file wpadverts/templates/list-item.php find there code

    <?php $price = get_post_meta( get_the_ID(), "adverts_price", true ) ?>
    <?php if( $price ): ?>
    <div class="advert-price"><?php esc_html_e( adverts_price( get_post_meta( get_the_ID(), "adverts_price", true ) ) ) ?></div>
    <?php endif; ?>

    and change it to something like

    <?php $is_sold = get_post_meta( get_the_ID(), "is_sold", true ) ?>
    <?php $price = get_post_meta( get_the_ID(), "adverts_price", true ) ?>
    <?php if( $is_sold ): ?>
    <div class="advert-price">SOLD</div>
    <?php elseif( $price ): ?>
    <div class="advert-price"><?php esc_html_e( adverts_price( get_post_meta( get_the_ID(), "adverts_price", true ) ) ) ?></div>
    <?php endif; ?>

    This should work assuming your new custom field will be named is_sold.

    Thanks Greg. It works

    Your support team at cordcanyon informed that you are bringing the “mark as Sold” option as an addon. I would like to request to place that option in manage ads section, inline along with edit and delete.

    Thank You for your support

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Replace Price Tag with Sold Tag’ is closed to new replies.