You can use the add_meta_boxes
hook to place a text field in the desired pages. Then on the template page you can check whether the user has entered some categories (display all categories if not) and filter the loop using the WP_Query
, query_posts()
or get_posts()
. Here is an excellent article on the three methods.