The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

Schedule Post to Stop (3 posts)

  1. djr3110
    Posted 8 years ago #

    Hi is there a plugin or hack that will allow me to have a start and end date for a post? What I want to do is automatically schedule content to be published and unpublished?



  2. mores
    Posted 8 years ago #

    Looking for the exact same thing, except for the schedule part.
    I have am working on a biography site for a client, and he has one-time jobs in his CV as well as jobs that lasted for months.
    Example: in a "Event Moderation" category there are all kinds of events that he moderated. Here my theme puts the date behind the title, all is fine.
    But he also worked as a tv-moderator from 2002-2005. I want to put this time period behind the title.

    Should I use a custom field? Or is there an elegant plugin?

  3. mores
    Posted 8 years ago #

    Okay, I did it with a custom field.
    I call it "endet" (which means "ends" in german :) )

    $endet = implode(get_post_custom_values('endet'));
    	if ($endet){$endet=" - ".$endet;}

    This pulls the variable from the post and converts it to a string, because it is an array initially.
    Then, where you output the time, add the "endet" variable:
    <?php the_time('j. F Y'); ?><?php echo $endet; ?>

    That's all I needed, hope you can use it too.

Topic Closed

This topic has been closed to new replies.

About this Topic