我在WordPress数据库中有一个表,其中包含lat&;储存了液化天然气,我想在结果页面“按距离排序”中添加一个排序功能,该功能可以获得离您提供的纬度较近的位置;液化天然气。我正在使用WP\\u查询,它需要使用它。谢谢:)
$my_query = new WP_Query( array(
\'post_status\' => \'publish\',
\'post_type\' => \'post\',
\'category__in\' => $category,
\'tax_query\' => array(
\'relation\' => \'AND\',
array(
\'taxonomy\' => \'age\',
\'field\' => \'id\',
\'terms\' => $age,
\'operator\' => \'IN\'
),
array(
\'taxonomy\' => \'price\',
\'field\' => \'id\',
\'terms\' => $price,
\'operator\' => \'IN\'
),
array(
\'taxonomy\' => \'group\',
\'field\' => \'id\',
\'terms\' => $group
)
),
\'posts_per_page\' => \'-1\',
) );