• Resolved stasdeveloper97

    (@stasdeveloper97)


    I have code.

    $couponargs = array(
        'post_type' => 'shop_coupon',
        'post__in' => $couponarrayfinal,
        'orderby' => 'title',
        'order' => 'ASC',
        'posts_per_page' => '-1'); 
    $coupons = get_posts($couponargs);
    
    <div class="wt-mycoupons">
       <ul>
        <?php
        foreach ($coupons as $coupon) {
            // if( $coupon->post_title == 'test-coupons' ) {
    
            // } else {
    
            // }
    
            echo "<li class='wt-single-coupon'><div class='title-coupon'>$coupon->post_title</div><div class='desc-coupon'>$coupon->post_excerpt</div></li>";
        }
        ?>
    </ul>
    </div>

    How can I output date_expiry in my code? Because I can output the date of creat, but I need the expiry_date.

    Thank you.

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Output expiry date coupon in PHP’ is closed to new replies.