WordPress Post Expirator 1.4.3 Released

This is a quick release to fix a bug that was preventing 3.0 multisite detection from working correctly.  If you are using 3.0 in multisite mode, I would suggest re-activating the plugin on the affected blogs.

The plugin can be downloaded at the WordPress Plugins Page.

This entry was posted in WP Post Expirator. Bookmark the permalink.

29 Responses to WordPress Post Expirator 1.4.3 Released

  1. David says:

    I have the post Expirator installed, and all is working fine.

    I would like to display my posts by the expiration date, which then sorts the posts, which are events, into their correct order, which isn’t post date.

    I’m having trouble getting the query in my theme page to work, and wondered if you can help.

    Here’s the current query, that is sorting by menu order (working with a post e-order plugin, that I’d like to get rid of):
    `
    $querystr = ”
    SELECT DISTINCT *
    FROM $wpdb->posts
    LEFT JOIN $wpdb->term_relationships ON($wpdb->posts.ID = $wpdb->term_relationships.object_id)
    LEFT JOIN $wpdb->term_taxonomy ON($wpdb->term_relationships.term_taxonomy_id = $wpdb->term_taxonomy.term_taxonomy_id)
    LEFT JOIN $wpdb->terms ON($wpdb->term_taxonomy.term_id = $wpdb->terms.term_id)
    WHERE $wpdb->posts.post_type = ‘event’
    AND $wpdb->posts.post_status = ‘publish’
    AND $wpdb->term_taxonomy.taxonomy = ‘event_cat’
    AND ($subquery)
    GROUP BY $wpdb->posts.ID ORDER BY $wpdb->posts.menu_order ASC
    “;
    `
    Can you possibly suggest what I need to change/add?

    Many thanks for any help offered.

    • Aaron Axelsen says:

      The expiration date is stored as a timestamp in the post meta table. So, you would need to add that table into the sql statement and then sort on that specific term.

      It would be a rather complex sql query, but it should be doable

      • John says:

        How about something like this?
        query_posts(‘meta_key=expiration-date&orderby=meta_value&order=ASC’)
        It seems to work for me, or is there something I’m missing?

  2. Marten says:

    Hey Aaron! Thnx for developing the Post Expirator plugin. I used it once a couple of years ago, and needed it again now for a project. I did need another option though, basically the ‘do nothing’ option so people can use the Plugin per post and be able to archive it in their website (say, upcoming events // past events). I modified the plugin a little and added a ‘normal’ option, so the post won’t be unpublished or deleted. Let me know if you’re interested in taking something like that in in your next release, maybe together with a function to get ‘past published posts’ or so. Cheers,

    Marten

  3. Francis says:

    Hi Aaron,

    Great plugin and I’m using it and works with the code the_content().

    However in my website, i wanted to remove all images in a post list. and used this code:

    $content = get_the_content();
    $postOutput = preg_replace('/]+./','', $content);
    echo $postOutput;

    Do you have any idea why the expiration wouldn’t appear in the content footer?

    Appreciate the assistance. Thanks.

    • Francis says:

      I got it working.

      Added this chunk of code in functions.php:
      //get the content with formatting
      function get_the_content_with_formatting ($more_link_text = '(more...)', $stripteaser = 0, $more_file = '') {
      $content = get_the_content($more_link_text, $stripteaser, $more_file);
      $content = apply_filters('the_content', $content);
      $content = str_replace(']]>', ']]>', $content);
      return $content;
      }

      Then in the index.php or single.php:
      <?php
      $content = get_the_content_with_formatting();
      $postOutput = preg_replace('/]+./','', $content);
      echo $postOutput;
      ?>

  4. Sam Zayvan says:

    Hey Aaron,
    I uploaded this plugin and it seems to work but I can’t get to the configuration page. When I go to the plugins page there seems to be no way to configure it. Can you help?

  5. Lars Lindmark says:

    what is the syntax for the shortcode, is below correct?
    [postexpirator “F j, Y, g:i a”]

  6. Francis says:

    Can I remove the time and assume all posts expire at midnight of the expiration date?

    How do I do this .. any help is highly appreciated. Thanks.

  7. CP says:

    I currently have Post Expirator 1.4.3 installed on a site. For some reason the posts are consistently expiring at UTC time when they should be expiring at UTC -5. The site general settings are set to UTC -5 and the gmt_offset in the database is also set to -5, but it looks like the plug-in isn’t grabbing that information.

    Currently using WordPress 3.1.3.

    Any assistance would be much appreciated.

    • CP says:

      Just an update – I found a solution. The time offset works if an actual city is selected in the WP Settings page, but not if the offset is set manually. Thanks.

  8. Renee says:

    I have installed this plugin but it does not remove the posts on the expiration date. I have tried everything but can not get it to work. HELP? Under the posts it shows the expiration dates properly but they are never removed.

  9. victor says:

    Hi

    I’ve been using your plugin and its great – One thing I’m trying to work out if there is a way of displaying the expiration date within the code rather than using the short-code within the WP admin? I basically want to specify exactly where the post expiration date is displayed by hardcoding it in.

    Thanks

  10. Ralf says:

    Hello Aaron,
    I tried the new version and the most times it works. But sometimes articles are published that shouldn’t. But by actualizing, the article is set up to “scheduled” again. Or I have to turn off the post expirator on the article, save and then turn on the post expirator again.
    Any idea?

    Thanks in advance
    Best regards
    Ralf

  11. Neil Sunset says:

    Hello Aaron. Firstly, great plugin! My situation is: I am using Gravity Forms plugin to allow users to submit posts, which works fine. My intent for your plugin is to make the posts automatically delete after three days. I was able to get it to work in this way when I personally create a post via the WP backend, but when I create a post through the website’s front end via Gravity Forms, even under a user with admin role privileges, the post is created but not with an expiration date. Any pointers?

    • Neil Sunset says:

      Is there a particular function in your plugin that I can hook into so that the two plugins are talking to each other?

    • Maryann says:

      Did you ever get these two plugins working together? I’d like to do the exact thing. Set the expiry on a Gravity form that creates posts.

      • qzha017@hotmail.com says:

        Hey Maryann were you able to set the expiration to work with the gravity forms? I am stuck on it for days and have no where to get any progress

  12. Fred says:

    Using ver 1.4.3 on any ver of WP from 3.0.4 to 3.2.1 I am able to drag the meta box to the right column, but after publishing or editing a post the meta box returns to the left column. This isn’t right. Can you look into what’s broken in the meta box handling code?

  13. SEFA AYDIN says:

    Hello,
    Firstly thanks this plugin. But I have a problem.
    problem is Language file. I can’t change Language. I create .mo and .po, and change name tr_TR.mo and tr_TR.po. after I upload ftp. but it doesn’t change. how can I fix this problem…???

  14. Biomech says:

    Hi, great plugin.
    I was wondering if it’s possible to remove a category instead of deleting or drafting a post?

    I have a “featured” category that show featured category posts in a carousel. I’d like them to no longer be featured after X amount of days.

  15. Liam says:

    how do you use the shortcode, it all seems to cryptic … can you give me an example of how I would set up a post to expire in 2 days from today?
    “[postexpirator] 02262012”
    ???!!!

Leave a Reply

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