there are some plugins to achieve what you are trying:
Post Expirator – Allows you to add an expiration date (minute) to posts which you can configure to either delete the post or change it to a draft.
Simple Expires – Enable Posts and Pages to automatically expire and change at a certain time, and provide notification of expiration.
as for the second part of your question,
I’d like to be able to have content
flagged as viewed by individual users
so i can then display it in a
different section of the site for that
user.
you can do that by simply adding a new usermeta field that will contain an array of post ids like so
function my_user_flag_887($post_id){
if ( is_user_logged_in() ) {
global $current_user;
get_currentuserinfo();
$user_flags = get_user_meta($current_user->ID, 'flaged', false);
$user_flags[] = $post_id;
update_user_meta($current_user->ID , 'flaged', $user_flags);
}
}
so all you have to do is call that function and pass the post_id to add/flag
my_user_flag_887('43');
and assuming that the user is logged in it will add the ID 43 to the users flag array.
and you can check to see if a user has flagged a post by simply checking if it in that array or even better you can use wp_query to select posts that are not in that array:
global $current_user;
get_currentuserinfo();
$user_flags = get_user_meta($current_user->ID, 'flaged', false);
$my_q = new WP_Query(array('post__not_in' => $user_flags ));
if ($my_q->have_posts()){
while ( $my_q->have_posts() ) { $my_q->the_post();
//do you loop stuff
}
}else{
echo 'nothing found';
}
Hope this helps