'Filter not working in wordpress admin panel
i am working with wordpress, and i am using wordpress plugin "glowmember", in wordpress admin panel right now i can filter data with some fields and i want to add one more filter so i can search data by "name",Here is my current code
while ( $query->have_posts() ) : $query->the_post();
$user_categories = get_post_meta( get_the_ID(), 'glow_user_categories', true );
$user_categories_specifics = get_post_meta( get_the_ID(), 'glow_categories_specific', true ) ?: [];
$user_gender = get_post_meta( get_the_ID(), 'glow_user_gender', true );
$glow_p_applications = get_post_meta( get_the_ID(), 'glow_p_application', true ) ? get_post_meta( get_the_ID(), 'glow_p_application', true ) : [];
$glow_post_title = get_post_meta( get_the_ID(), 'glow_post_title', true ) ? get_post_meta( get_the_ID(), 'glow_post_title', true ) : []; // adding this line for get data by name
if ( isset( $_GET['city'] ) && $_GET['city'] != 'all' ) {
$city = preg_replace("/&([a-z])[a-z]+;/i", "$1", htmlentities($_GET['city']));
if ( empty( $user_cities ) || ! in_array( strtolower($city), $user_cities ) ) {
continue;
}
}
if ( isset( $_GET['gender'] ) && $_GET['gender'] != 'all' ) {
if ( $_GET['gender'] != $user_gender ) {
continue;
}
}
if ( isset( $_GET['post_title'] ) && $_GET['post_title'] != 'all' ) {
if ( $_GET['post_title'] != $glow_post_title ) {
continue;
}
}
But fiter not working for me, Here is my current url (using get method but not working with "name" parameter)
http://mysiteurl/wp-admin/admin.php?page=glow-members-all-users&cat=all&city=all&state=all&gender=all&cat_spec=all&post_title=lisa
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
