• Hi, and thanks for your time!

    I’m using plugin The Future Is Now for an events website so that I may post events after the actual date they’re being posted on. What I’m trying to accomplish is to change a post’s category once that date passes.

    Right now, when I post an event, I have them under category “featured”. I would like to change that category to something else once that date passes since they will no longer be featured.

    Any help is appreciated!!

    thanks

Viewing 1 replies (of 1 total)
  • Thread Starter fcarthy

    (@fcarthy)

    I just found wp_set_post_categories. Could I use something like this?

    if ( abs(time()-get_the_time('U')) > (.35*86400) ) {
    	wp_set_post_categories( $post_ID, 4 );
    	}
    }
Viewing 1 replies (of 1 total)
  • The topic ‘Change post category after future post date’ is closed to new replies.