Home › Forums › General Issues › Select posts by Category && Custom Field? › Reply To: Select posts by Category && Custom Field?
It’s a select.
What I would ideally like is a copy of the Category widget (just with Brands instead), but I can’t seem to get my head around it. So therefore I’m trying to use a custom field instead, but I’m having serious trouble figuring out how to retrieve post using multiple ‘parameters’.
I’ve been trying something in this direction:
$args_jewellery = array(
'post_type' => 'jewellery',
'category' => $category,
'numberposts' => -1,
'meta_query' => array(
array(
'key' => $brand
// 'compare' => 'EXISTS'
)
)
);
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.