• Resolved nadine00

    (@nadine00)


    Hi,

    I am trying to sort posts by a custom field, using the plugin Magic Fields. The problem? When I use the option of a checkbox, I can not get my posts to sort. It works fine if its a drop down, or another form of single info using this method:

    <?php $making_args = array(
            'cat' => 22,
            'meta_key' => 'lesson-type', //this is the magic field variable
            'meta_value' => 'Self Study', //this is the value it looks for
            'posts_per_page' => 10,
            'offset' => 0,
            );?>

    But does not work if the input is a check box because apparently the plugin writes an array to the field.

    From the google group (what is in the database):
    post_meta save a:2:{i:0;s:3:"dos";i:1;s:6:"cuatro";}

    I am looking for suggestions on how to parse that array. I’m asking both here and in the google group.

    Thanks!

    Nadine

  • The topic ‘[plugin: magic fields] Sorting By Custom Fields with Magic Fields checkbox’ is closed to new replies.