Using MySQL LIKE function for custom field data grab possible?
-
As the title says, I have custom field data with a meta_key of say ‘letters’ and the meta_value in ‘letters’ is:
a, b, c, d, eWhat I want to do is list pages where ‘letters’ is LIKE ‘b’
<?php
$PageOptions = array(
‘title_li’ => ”,
‘meta_key’=>’letters’,
‘meta_value’=>’%b%’
);
echo “<ul style=\”font-size: 18px;\”>”;
wp_list_pages($PageOptions);
echo “”;
?>I can’t seem to get it working. Thanks.
- The topic ‘Using MySQL LIKE function for custom field data grab possible?’ is closed to new replies.