Content created by members - what happens when membership expires

As part of our membership service, members can create content in the website. However, when their membership expires, the content should effectively expire with it. So we should never have active content associated with an inactive member. Is this something that can be done with membership? If not, any suggestions how we can achieve this?

  • Nastia

    Hello Johanna , I trust you are doing well today!

    Unfortunately, this feature is not included in Membership 2 plugin, it will require a lot of custom coding. It will need an extra plugin or an add-on for Membership 2 that will check the user membership status, and if the user doesn't have membership delete the post users has created.

    I am afraid this is out of a scope that we can provide in our forums. I've searched if a similar feature were requested in the past, in our forum, though found nothing related to it.

    Feel free to post a new job in Jobs & Pros section so a skillful developer can do this for you.

    For now, you can manually delete posts from authors using the bellow script:

    global $wpdb, $current_site;
    query_posts('author=11,161,23,6');  //the ID authors 
    while ( have_posts() ) : the_post();
        wp_delete_post( $post->ID, true );

    Let me know if you have any further questions!

    Kind regards,

  • Nastia

    Hello Johanna

    I apologize for late reply.

    I am afraid this feature is not included in the Membership 2 Pro plugin. This feature requires a lot of PHP coding, please post a job in Jobs & Pros section, where you can find a developer that can do this for you.

    In the meantime, I've transferred this thread to Features & Feedback section so our members could vote "+1" here.

    If this thread will get a lot of "+1" requests from other members, our developers will consider adding it to the features list.

    Hope this helps!

    Kind regards,

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.