カスタム ポッド がありproduct_type、そのポッドには という名前のカスタム フィールドがありlabelます。label特定の文字列に一致するすべてのポッドを見つけたいです。
私はこれを試しています(および他のいくつかのバリエーション):
$mypod = pods('product_type', array(
'where' => 'product_type.label LIKE "%'.$someLabelString.'%"',
'limit'=>-1
));
product_type.labelまた、クエリの一部を に変更しようとしましt.labelたが、役に立ちませんでした。次のエラーが表示されます。
Database Error; SQL: SELECT DISTINCT `t`.* FROM `wp_posts` AS `t` WHERE ( ( `product_type`.`label` LIKE "%hello%" ) AND ( `t`.`post_type` = "product_type" ) AND ( `t`.`post_status` IN ( "publish" ) ) ) ORDER BY `t`.`menu_order`, `t`.`post_title`, `t`.`post_date`; Response: Unknown column 'product_type.label' in 'where clause'