Search Results showing expired listings

Home Forums WordPress Theme CityBook – Directory & Listing WordPress Theme Search Results showing expired listings

This topic contains 10 replies, has 3 voices, and was last updated by  CTHthemes 6 days, 20 hours ago.

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #38270

    Br4in5t0rm
    Participant

    Supported

    Hi support, hope you are well.

    As the heading suggests, expired listings are still displaying in search results, redirecting to a 404.

    1. How can I fix this? ‘Delete expired listings’ are checked in citybook add-on settings. My cache is cleared multiple times
    2. Is there a way to notify listing authors that listing is due to expire?

    #38318

    Br4in5t0rm
    Participant

    Supported

    ??

    #38334

    CTHthemes
    Keymaster

    1 – What’s is the items?

    2 – There is dashboard notification only not for eamil. But there is citybook_listing_expired action hook with expired listing id variable, so you can create custom code for email notification.

    #38349

    Br4in5t0rm
    Participant

    Supported

    There are many:
    cheshireclassifieds.com/purplekitty/enjoy-the-morning-out-at-tokai-picnic-and-braai-area/
    cheshireclassifieds.com/sumayadavids/fresh-homemade-oven-baked-bread-sunday-monday-only/
    cheshireclassifieds.com/sayadstransport/minibus-quantum-hire-with-driver/
    cheshireclassifieds.com/purplekitty/take-the-full-day-cape-peninsula-tour/

    #38382

    CTHthemes
    Keymaster

    Hello, they are showing without any error:
    https://prnt.sc/pzi80p
    https://prnt.sc/pzi7q4

    #38385

    Br4in5t0rm
    Participant

    Supported

    These listings have expired already but still displays. Listing must not show in search results when expiry reached

    #38419

    CTHthemes
    Keymaster

    Expired listings will be set to pending status automaically and will not visible on front-end any more: https://prnt.sc/pzztwk
    But if you edit listings from wp back-end area, they are visible then.
    Also make sure that cache is deleted after few hours.

    #38608

    Aron Verhoeven
    Participant

    Supported

    Hi Support,

    Is there an way to set an automatic expirement for an specific listing type?

    I would like to hide listings after 2 weeks.

    Thanks in advance.

    #38629

    CTHthemes
    Keymaster

    Try this code: https://prnt.sc/q3n92p

    
    // expire listing for specific listing type and on submit listing only - not editing
    if( $edit === false &&  $listing_type_id == YOUR_LISTING_TYPE_ID ){
        citybook_addons_unscheduleExpireEvent($listing_id);
    
        $two_weeks_later = Esb_Class_Date::modify('now', 14, 'Y-m-d');
        $ts = get_gmt_from_date( $two_weeks_later,'U' );
    
        citybook_addons_scheduleExpireEvent($listing_id,$ts);
    }
    

    don’t forget change YOUR_LISTING_TYPE_ID with your listing type id

    #38638

    Aron Verhoeven
    Participant

    Supported

    Okay, thanks! Placed it in the cpt-listing.php file, will check it out and come back to let you’ll know if its working 🙂

    https://prnt.sc/q3pspk

    #38658

    CTHthemes
    Keymaster

    It’s ok.

Viewing 11 posts - 1 through 11 (of 11 total)

You must be logged in to reply to this topic.

New featues: CityBook - Listing & Directory WordPress Theme version 2.1.8 was outUpdate now
+