Bulk Listing Renewal

Discussion in 'GeoCraft WordPress Theme' started by trentmunday, Oct 28, 2013.

  1. trentmunday

    trentmunday New Member

    Joined:
    Aug 14, 2013
    Messages:
    29
    Likes Received:
    0
    Hi!

    I'm trying to renew the expired listing but I'm unable to do it... When I'm trying to publish it goes in draft or scheduled...

    Please help!
     
  2. Gourav

    Gourav Support Staff

    Joined:
    Oct 19, 2012
    Messages:
    7,728
    Likes Received:
    207
    Hello,

    Go to function.php present in your theme directory and add the code given below

    Code:
    global $wpdb;
    $data="SELECT * FROM wp_posts WHERE post_status = 'draft'";
    $queries = $wpdb->get_results($data);
    foreach ($queries as $query) {
    echo $post_id=$query->ID;
    $meta_key='gc_listing_duration';
    $post_status='post_status';
    $posttable='wp_posts';
    $meta_value='08/20/2013 07:15:45';
    update_post_meta($post_id, $meta_key, $meta_value);
    $wpdb->update($posttable,array($post_status =>'publish'), array( 'ID' =>$post_id ),array('%s'),array( '%d' ));
    }
    [​IMG]

    "$meta_value" defines as the date at which you want to expire your listing, So fill "$meta_value" as per your requirements.

    Firstly save that code in the bottom of function.php file and then refresh your dashboard and website, It will activate your all listings after that remove that code and again save your file.
     
  3. trentmunday

    trentmunday New Member

    Joined:
    Aug 14, 2013
    Messages:
    29
    Likes Received:
    0
    Hi!

    I already tried it's not working... Expired listing are still in draft...

    I tried few times but still it didn't work...

    Any idea?

    Tc!
     
  4. trentmunday

    trentmunday New Member

    Joined:
    Aug 14, 2013
    Messages:
    29
    Likes Received:
    0
    Hi!

    I found another way to do it...

    But the codes that you gave it didn't work!
     
  5. Gourav

    Gourav Support Staff

    Joined:
    Oct 19, 2012
    Messages:
    7,728
    Likes Received:
    207
    Hello,

    The code provided above is working fine at our side, If you are getting problem then,

    Please provide the following information listed below.

    Thread Link:
    Your Website URL:
    WordPress Username:
    WordPress Password:

    Send this information on our email at [email protected]
    We will check your issue.
     
  6. jsal2

    jsal2 Member

    Joined:
    Dec 23, 2012
    Messages:
    112
    Likes Received:
    7
  7. sooraj

    sooraj Member

    Joined:
    Jun 10, 2013
    Messages:
    181
    Likes Received:
    1
    Location:
    India
    hello sir
    how can you solve this problem . Let me know..?
     
  8. Pramod

    Pramod Guest

    Joined:
    Aug 8, 2014
    Messages:
    2,847
    Likes Received:
    63
    Hello sooraj!

    We have got your email regarding to another issue.
    We will reply you soon with fix of both.

    Thank & Regards
    Pramod
     

Share This Page