Strange things happening to my site today!

Discussion in 'GeoCraft WordPress Theme' started by coaster, Aug 25, 2013.

Thread Status:
Not open for further replies.
  1. coaster

    coaster New Member

    Joined:
    Jun 17, 2012
    Messages:
    26
    Likes Received:
    1
    Location:
    Melbourne
    Firstly, around 80 of my listings have expired early and are now saved as drafts.
    I am unable to save them as pending, or even publish them.

    An email was sent from the site to all the expired listing users telling them their listing had expired. Unfortunately it was sent globally so all users saw everybodys messages.

    Any ideas why this may have happened and how I can stop it happening again, and also how I can publish the listings again?

    Thanks!

    http://www.australianweddingcelebrants.com.au
     
    webunet likes this.
  2. webunet

    webunet Member

    Joined:
    Dec 14, 2012
    Messages:
    58
    Likes Received:
    1
    Location:
    Kalispell, Montana
    I have the same problem. My settings are set to renew in 12 month, but they began renewing in 6 mos.
     
  3. 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' ));
    }
    
    Sending image for reference
    [​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.



    This type of issue is not happening at our side and we are trying to create it. If it occur we will definitely find a permanent solution for that.
     
  4. coaster

    coaster New Member

    Joined:
    Jun 17, 2012
    Messages:
    26
    Likes Received:
    1
    Location:
    Melbourne
    Thanks Gourav - thats great! It all seems to be working again. Phew!
    Cheers
     
Thread Status:
Not open for further replies.

Share This Page