Forums

Using MySQL LIKE function for custom field data grab possible? (1 post)

  1. WPJunky
    Member
    Posted 3 years ago #

    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, e

    What 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.

Topic Closed

This topic has been closed to new replies.

About this Topic