Automatically exclude categories from metabox based on title
You have chosen to tackle a hard problem for one so new to PHP. 🙂 This might get you closer to your goal: global $wpdb; if ( in_array( $pagenow, array(‘post.php’, ‘post-new.php’) ) ) { foreach (get_categories() as $category) { $cat_time = strtotime($category->cat_name); if ( $cat_time < strtotime(‘-3 days’) || $cat_time > strtotime(‘+2 months’) ) $exclude … Read more