• Resolved rd78

    (@rd78)


    Hello! Thanks for a really great plugin.

    I have a custom field that I’d like to filter that is part of a recipes plugin. However, rather than using different meta keys for each field, the plugin seems to be storing everything in an array in one meta key.

    Here is how you can return the field within PHP. How can I filter this field in your plugin?

    $recipe_meta = get_post_meta( $recipe_id, 'delicious_recipes_metadata', true );
    
    $field = $recipe_meta['difficultyLevel'];
    
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author stepasyuk

    (@stepasyuk)

    Hello @rd78

    Thank you for your interest in Filter Everythig plugin.

    For the moment it requires to make some code changes directly in the plugin and such hardcoded things will not be compatible with future updates. But I can also add new hooks in the next plugin verison that allows you to modify filtered WP_Query and to add support of the stored in such way data.

    Of course it requires from you to be familiar with PHP coding to implement that.

    Thread Starter rd78

    (@rd78)

    Hello, it would be amazing if you could add those hooks! It would be really helpful for lots of reasons. Thanks for the suggestion!

    I can also see those hooks helping for the event plugin I use. I’d like to use the filters to sort by event start date, which doesn’t seem to be currently possible either (unless I’ve overlooked something?).

    Thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Filtering custom fields that are arrays’ is closed to new replies.