在我看来,实现您想要的最好方法是使用自定义字段和与WP查询和Ajax链接的元查询。您可以在此处找到文档:https://codex.wordpress.org/Class_Reference/WP_Query#Custom_Field_Parameters
带有meta\\u查询的WP\\u查询示例:
new WP_Query(array(
\'post_type\' => array(\'post_links\', \'page\'),
\'meta_query\' => array(
\'relation\' => \'AND\',
\'cost\' => array(
\'key\' => \'cost\',
\'value\' => \'500\',
\'compare\' => \'<=\',
),
\'country\' => array(
\'key\' => \'country\',
\'compare\' => \'France\',
),
\'city\' => array(
\'key\' => \'city\',
\'compare\' => \'EXISTS\',
),
),
\'orderby\' => array(
\'cost\' => \'ASC\',
\'city\' => \'ASC\',
),
));
另一种方法是另一个存储数据的表,这取决于您的需要和要存储的数据量。