• Resolved kalesco

    (@kalesco)


    As default expire action for posts I have chosen replace category. But the default value stays at “Draft” when the _expiration_date_options meta value is empty.
    I use a frontend editing plugin (wp-uf) to let my users create posts, and a hidden field for the post expiration set at +2weeks.
    The field works, but the default value for the action that I set in the plugin settings doesn’t.

    Any ideas?

    My workaround would be to copy the _expiration_date_options value of a post created in the backend with the correct settings and let this be saved in a hidden field by the frontend editing as well.

    http://wordpress.org/plugins/post-expirator/

Viewing 8 replies - 1 through 8 (of 8 total)
  • Did you ever figure this out?

    Thread Starter kalesco

    (@kalesco)

    No, I used the workaround and set it explicitly.

    Are you saying the settings page is not saving your option, or that the saved option is not working? Can you give me some info on your configuration?

    The settings page doesn’t save the option. Well it does, but not in the way I had hoped it would. So this is probably more of a feature request than a bug.

    Currently, let’s say I choose a Default Expiration Category in the Settings. If I Enable Post Expiration for a post, the How to Expire select defaults to Draft.

    Ideally, since I chose a Category that I’d like it to default to, the How to Expire select should default to add that Category to the post.

    After thinking about the Settings more, though, I see where there is quite a bit more to factor in for this to function correctly and cover all different scenarios (e.g. defaulting to remove or replace a Category instead). There would need to be more options in the settings, so that’s why it’s a feature request.

    The Default Expiration Category is really a legacy option there on the main screen. It really needs to eventually be broke out to the defaults screen so it can be configured for each post type. Currently, you would also need to change the “How to Expire” option on the defaults screen to one of the category options, then it should pull from the default list.

    This is one of the things on my list to work on, but there just wasn’t time to implement this the last go around :/

    Would the suggested change solve your issue?

    https://postexpirator.uservoice.com/forums/176410-general/suggestions/5628869-move-default-expiration-category-to-defaults-pag

    No, that suggestion wouldn’t solve the issue.

    Basically, I’d like to set it and forget it. Meaning, after I choose a Default Expiration Category on the main screen, it should automatically be set to add that category as soon as I check Enable Post Expiration on an individual post.

    Currently, after I check Enable Post Expiration, I then have to also change the How to Expire option from Draft to the desired category that I set as the Default Expiration Category.

    It’s really just one more click, so it’s not a big deal – but it could probably be altered to work that way by adding more options on the main screen to allow for fine tuning the preferred result.

    Here’s an example:
    Let’s say that I’ve setup my wp query to show all posts except for posts with a category called “Invisible.” And I have time-sensitive posts that must be removed from the query after 30 days from their publish date.

    It would be a perfect scenario if there were options in the settings that allowed me to set custom actions as soon as I enable post expiration for a post. So I’d be able to set the following:
    1. How to Expire (Draft, Delete, Private, Category:Add, Category:Replace, or Category:Remove)
    2. Default Category (if I selected one of the category options in the How to Expire setting)
    3. Default TIme

    For my example, I’d choose:
    1. Category:Add
    2. Invisible
    3. +30 days

    Then, as soon as I enable post expiration on a post, everything would be set to those settings. And after 30 days, the Invisible category is added to the post – therefore removing it from the wp query.

    I’m sure there are other options that could be added to the main screen as well. I know my situation is just one use case. Hope that make sense.

    Aaron:

    Please disregard what I just wrote. I just updated the plugin to the latest version, and you nailed it! It works exactly how I had hoped.

    Sorry for speaking too soon.

    Great work!

    Great! Glad you are set!

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Default expiration behaviour cannot be set’ is closed to new replies.