The restrict_manage_posts action triggers the
add_extra_tablenav() function, which is how you add additional dropdowns to your desired List Table.
In the example below, we first ensure that the Post Type is correct, and then we grab all DB values stored against the
competition_name key in the
postmeta table (you must change the key name as required). The query is fairly basic and only checks to see if the Competition is published, takes only unique values (you don't want duplication in the dropdown) and then orders them alphabetically.
Next we check for results (no point outputting the dropdown for nothing), and then construct the options (including a defualt to show all). Finally the dropdown is output.
As stated in my comment, this isn't the end of the story though; you'll need some logic to tell the List Table to only show your desired results when the filter is active, but I'll leave you to have a look at that and then start another question if you require further assistance. Hint - check out the file
/wp-admin/includes/class-wp-posts-list-table.php, and it's parent
* Add extra dropdowns to the List Tables
* @param required string $post_type The Post Type that is being displayed
/** Ensure this is the correct Post Type*/
if($post_type !== 'competition')
/** Grab the results from the DB */
$query = $wpdb->prepare('
SELECT DISTINCT pm.meta_value FROM %1$s pm
LEFT JOIN %2$s p ON p.ID = pm.post_id
WHERE pm.meta_key = "%3$s"
AND p.post_status = "%4$s"
AND p.post_type = "%5$s"
ORDER BY "%3$s"',
'competition_name', // Your meta key - change as required
'publish', // Post status - change as required
$results = $wpdb->get_col($query);
/** Ensure there are options to show */
/** Grab all of the options that should be shown */
$options = sprintf('<option value="-1">%1$s</option>', __('All Competitions', 'your-text-domain'));
foreach($results as $result) :
$options = sprintf('<option value="%1$s">%2$s</option>', esc_attr($result), $result);
/** Output the dropdown menu */
echo '<select class="" id="competition-name" name="competition-name">';
echo join("\n", $options);