Skip to main content
added 148 characters in body
Source Link
Noman
  • 159
  • 6

you can use meta query operators like below query. See docs for meta_query parameters here

$range = $_GET['range']; // assuming you get the range from query string parameter which 11-19
$range_array = explode('-',$range);
$args = array(
    'post_type' => 'YOUR-POST-TYPE',
    'meta_query' => array( 
     array(
         'key' => 'sizes_avaliable',
         'value' =>  $range_array,
         'compare' => 'BETWEEN'
         ),
     )
); 

It would be better if you add screenshot of table containing record of sizes against id. so i will check for it if my answer doesn't work for you.

you can use meta query operators like below query. See docs for meta_query parameters here

$range = $_GET['range']; // assuming you get the range from query string parameter which 11-19
$range_array = explode('-',$range);
$args = array(
    'post_type' => 'YOUR-POST-TYPE',
    'meta_query' => array( 
     array(
         'key' => 'sizes_avaliable',
         'value' =>  $range_array,
         'compare' => 'BETWEEN'
         ),
     )
); 

you can use meta query operators like below query. See docs for meta_query parameters here

$range = $_GET['range']; // assuming you get the range from query string parameter which 11-19
$range_array = explode('-',$range);
$args = array(
    'post_type' => 'YOUR-POST-TYPE',
    'meta_query' => array( 
     array(
         'key' => 'sizes_avaliable',
         'value' =>  $range_array,
         'compare' => 'BETWEEN'
         ),
     )
); 

It would be better if you add screenshot of table containing record of sizes against id. so i will check for it if my answer doesn't work for you.

Source Link
Noman
  • 159
  • 6

you can use meta query operators like below query. See docs for meta_query parameters here

$range = $_GET['range']; // assuming you get the range from query string parameter which 11-19
$range_array = explode('-',$range);
$args = array(
    'post_type' => 'YOUR-POST-TYPE',
    'meta_query' => array( 
     array(
         'key' => 'sizes_avaliable',
         'value' =>  $range_array,
         'compare' => 'BETWEEN'
         ),
     )
);