Adding a Meta to the wp_get_archives
1) You need to include postmeta into query that you’re using for archive pages in a kind of this way: add_filter(‘getarchives_join’, ‘my_archives_join_filter’); function my_archives_join_filter($join) { if (!is_user_logged_in()) { global $wpdb; return $join . “LEFT JOIN $wpdb->postmeta ON ($wpdb->posts.ID = $wpdb->postmeta.post_id)”; } return $join; } 2) You need to include condition to select a post with … Read more