How to delete custom field “suggestions” from dropdown list

You can filter the query for these keys on’query’. I would start that filter as late as possible to avoid side effect. Sample code, tested: add_filter( ‘postmeta_form_limit’, ‘wpse_73543_hide_meta_start’ ); function wpse_73543_hide_meta_start( $num ) { add_filter( ‘query’, ‘wpse_73543_hide_meta_filter’ ); return $num; } function wpse_73543_hide_meta_filter( $query ) { // Protect further queries. remove_filter( current_filter(), __FUNCTION__ ); $forbidden … Read more

Query meta field using between

Your problem is this: CAST(wp_postmeta.meta_value AS SIGNED) Run a simple SQL query (command line or PhpMyAdmin, whatever you like) like SELECT CAST(‘1.2’ as SIGNED) and you will see that the value returned is 1. What causes that cast is ‘type’ => ‘NUMERIC’,. You can pass DECIMAL to meta_query instead of NUMERIC but I don’t see … Read more

register_rest_field for custom taxonomy fields that are assosiated with custom post type

Both callbacks in the register_rest_field_for_custom_taxonomy_location() function are misspelled. change ‘get_callback’ => ‘location_get_term_meta’, ‘update_callback’ => ‘location_update_term_meta’, to ‘get_callback’ => ‘location_get_term_meta_field’, ‘update_callback’ => ‘location_update_term_meta_field’, Register Code function register_rest_field_for_custom_taxonomy_location() { register_rest_field( ‘location’, ‘location_code’, array( ‘get_callback’ => ‘location_get_term_meta_field’, ‘update_callback’ => ‘location_update_term_meta_field’, ‘schema’ => null, ) );