• Resolved jjangbi

    (@jjangbi)


    Hi there. I have purchased ALM and I want to use two meta keys. My alm_render arg looks something like this:

    
    ...
    'order'                                 => $order,
    'orderby'                               => $orderby,
    'meta_key'                              => $meta_key,
    'search'                                => $search,
    ...
    

    This is fine for sorting the search based on the meta key. However, I wish to also impose another meta key to filter the results to an ACF field (filter by posts of type ‘x’).

    However, the shortcode generator to filter by an ACF field looks something like:

    
    ...
    'meta_key'      => $meta_key,
    'meta_value' .  => $meta_value,
    'meta_compare'  => "IN"
    ...
    

    This requires me to use the meta_key field that I was using for sorting. How would I use another meta_key so that one is for sorting and the other for filtering? I understand how to do this in a regular WP Query but not in the ALM render.

    Thanks a bunch.

Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Using two meta_keys’ is closed to new replies.