benutzerdefinierte Post von Taxonomie filtern funktioniert nicht?

Momentan habe ich 3 Tabellen wie folgt:

wp_term_relationships:

objec_id term_taxonomy_id 51 6 52 6 53 7 

wp_terms

 term_id name 6 quan 1 7 quan 2 8 quan 3 

wp_term_taxonomie

 term_taxonomy_id term_id taxonomy 6 6 destination 7 7 destination 8 8 destination 

Wie kann ich Filterpostbasis auf Termid erhalten, zZ addiere ich manuellen Filter aber es funktioniert auch nicht Hier ist mein Code

 add_action( 'restrict_manage_posts', 'tronxoay_filter_restrict_manage_posts' ); function tronxoay_filter_restrict_manage_posts(){ $type = 'post'; if (isset($_GET['post_type'])) { $type = $_GET['post_type']; } if ('hotel' == $type){ $star = array( '1 star' => '1', '2 star' => '2', '3 star' => '3', '4 star' => '4', '5 star' => '5', ); $destination = get_terms( array( 'taxonomy' => 'destination', 'hide_empty' => false, ) ); echo ''; echo 'Rating '; $current_v = isset($_GET['rating_select'])? $_GET['rating_select']:''; foreach ($star as $label => $value) { printf('%s',$value,$value == $current_v? ' selected="selected"':'',$label); } echo ''; echo ''; echo 'Destination '; $current_d = isset($_GET['destination_select'])? $_GET['destination_select']:''; foreach ($destination as $value1) { printf('%s',$value1->term_id,$value1->term_id == $current_d? ' selected="selected"':'',$value1->name); } echo ''; } } add_filter( 'parse_query', 'tronxoay_hotel_filter' ); function tronxoay_hotel_filter( $query ){ global $pagenow; $type = 'post'; if (isset($_GET['post_type'])) { $type = $_GET['post_type']; } if ( 'hotel' == $type && is_admin() && $pagenow=='edit.php' && isset($_GET['rating_select']) && $_GET['rating_select'] != '') { $query->query_vars['meta_key'] = 'tronxoay_hotel_meta_rating'; $query->query_vars['meta_value'] = $_GET['rating_select']; } if ( 'hotel' == $type && is_admin() && $pagenow=='edit.php' && isset($_GET['destination_select']) && $_GET['destination_select'] != '') { $query->query_vars['taxonomy'] = 'destination'; $query->query_vars['field'] = 'term_id'; $query->query_vars['terms'] = '6'; } } 

Solutions Collecting From Web of "benutzerdefinierte Post von Taxonomie filtern funktioniert nicht?"