<pre class="lang:php decode:true ">//create custom column headers
add_filter( 'manage_edit-customer_columns', 'ontex_add_customer_cat_column' );
function ontex_add_customer_cat_column( $defaults ) {
	$defaults['hco-id'] = 'Health  Care Org';

	return $defaults;
}

//make custom column headers sortable
add_filter( "manage_edit-customer_sortable_columns", "ontex_customer_sortable_columns" );
function ontex_customer_sortable_columns( $columns ) {
	$columns['hco-id'] = 'hco-id';

	return $columns;
}

//populate custom column values
add_action( 'manage_customer_posts_custom_column', 'ontex_populate_customer_cat_column', 10, 2 );
function ontex_populate_customer_cat_column( $column, $post_id ) {
	switch ( $column ) {
		case 'hco-id':
			$hco_post = get_post( get_post_meta( $post_id, 'hco-id', true ) );
			if ( $hco_post ) {
				echo $hco_post-&gt;post_title;
			}
			break;
	}
}

// create HCO dropdown filter
add_action( 'restrict_manage_posts', 'ontex_admin_customers_filter_hco' );
function ontex_admin_customers_filter_hco( $post_type ) {
	if ( 'customer' === $post_type ) {

		global $wpdb;
		$sql  = 'SELECT ID, post_title FROM ' . $wpdb-&gt;posts . ' WHERE post_type LIKE "hco" AND post_status LIKE "publish"';
		$hcos = $wpdb-&gt;get_results( $sql, OBJECT );

		?&gt;
		&lt;select name="hco-id"&gt;
			&lt;option value=""&gt;Filter by HCO&lt;/option&gt;
			&lt;?php
			$current_hco = isset( $_GET['hco-id'] ) ? $_GET['hco-id'] : '';
			foreach ( $hcos as $hco ) : ?&gt;
				&lt;option &lt;?php selected( $hco-&gt;ID, $current_hco ); ?&gt; value="&lt;?php echo $hco-&gt;ID; ?&gt;"&gt;&lt;?php echo $hco-&gt;post_title; ?&gt;&lt;/option&gt;
			&lt;?php endforeach; ?&gt;

		&lt;/select&gt;
		&lt;?php
	}
}

//apply hco filtering to posts list results
add_filter( 'parse_query', 'ontex_admin_filter_customers_by_hco' );
function ontex_admin_filter_customers_by_hco( $query ) {
	global $pagenow;
	if ( isset( $_GET['post_type'] ) &amp;&amp; 'customer' == $_GET['post_type'] &amp;&amp;
	     is_admin() &amp;&amp;
	     $pagenow == 'edit.php'
	     &amp;&amp; isset( $_GET['hco-id'] ) &amp;&amp; $_GET['hco-id'] != ''
	) {
		$query-&gt;query_vars['meta_query'][] = array(
			'key'   =&gt; 'hco-id',
			'value' =&gt; intval( $_GET['hco-id'] ),
		);
	}
}</pre>
&nbsp;