Your question is pretty minimal but I will give it a shot.
- You would want to add a meta box for your value.
- On
save_post
save the data to$wpdb->postmeta
- Filter your feed using
pre_get_posts
and/orposts_where
as
needed.
A very basic code outline:
function generic_box() {
add_meta_box(
'generic_box', // id, used as the html id att
__( 'Generic Title' ), // meta box title
'generic_cb', // callback function, spits out the content
'post', // post type or page. This adds to posts only
'side', // context, where on the screen
'low' // priority, where should this go in the context
);
}
function generic_cb() {
echo 'generic content';
}
add_action( 'add_meta_boxes', 'generic_box' );
function generic_save($post_id) {
// use $post_id and the global $_POST variable to process information
// use update_post_meta() to save information
}
add_action('save_post','generic_save');
function generic_pre_get_posts($qry) {
if (is_feed()) {
// alter your query
}
}
add_action('pre_get_posts','generic_pre_get_posts');