delete all and not a category

Hello,
I’m using this plugin for a very long time and I delete posts older than 60 days for a specific category.

But, since october/november, the plugin is deleting everything, every post form all category.

I have delete config and the plugin.
I reinstall it, but still the same.

Could you help me please ?

3 thoughts on “delete all and not a category

  1. the support admin Post author

    Hi there,

    as you mention this issue has started since a month or 2 ago .. and my plugin has not changed in the last 7 months I find it hard to believe the way it is looking to behave is 100% due to my plugin.

    Please disable all others and check if you do not have any other code in place that deletes posts (perhaps your (new?) theme ? )

    Reply
  2. kornflex

    Thank you for your help.

    Before, I was deleting my old posts.
    When I saw the problem, I change to : move to trash.

    And now, posts are going to trash, so I can restore them, every posts, not only the specific category.

    So I think it’s the plugin but I don’t know why he crashes now :/
    I had to find why…

    Reply
  3. the support admin Post author

    This is the code, as long as you have selected a valid category it will search for the posts by category, if not … it will search for all posts ..

    if($cat_id > 0)
    {
    // Do only the last 50 (by date, for 1 cat)
    $myposts = get_posts(‘category=’ . $cat_id.’&post_type=’.$the_type.’&numberposts=75&order=ASC&orderby=post_date’);
    }
    else
    {
    // Do only the last 50 (by date, ALL)
    $myposts = get_posts(‘post_type=’.$the_type.’&numberposts=75&order=ASC&orderby=post_date’);
    }

    Reply

Leave a Reply to the support admin Cancel reply

Your email address will not be published. Required fields are marked *