Seems like this isn’t a thing from my current googling, but I would LOVE it to be, it would open up so many more possibilities with this great plugin!
Yes why is this not something to add to the plugin? I deleted a content item from a repeater, but it’s still showing on the frontend, it hasn’t been removed from the database. How do I solve this??
Suddenly having the same error two. Same theme as I’ve used previously with no issues, clean install, same server…
Would be a VERY welcome addition, and is actually something I think should be included in WordPress as well. One of the major issues I continually face with clients is them not taking any notice of minimum image sizes I ask of them, which ends up ruining layouts I may have created.
This – from the ACF docs – is the kind of thing I’m trying to do, but this code isn’t working:
$posts = get_posts(array(
'meta_query' => array(
array(
'key' => 'field_name', // name of custom field
'value' => '"red"', // matches exaclty "red", not just red. This prevents a match for "acquired"
'compare' => 'LIKE'
)
)
));
if( $posts )
{
//...
}
Though… not really understanding why this is in the functions, and how I actually display this in a template page…?
Your initial assumption is correct, I need it to filter out the posts that are returned so needs to be in the query. Not for the main loop, but for a Custom Post Type loop.
But it’s a checkbox, so it can have one or multiple items. Though I am checking for just one item per query (this will be used a number of times depending on page) so it might still work, I’ll give it a go.
Cheers.
Haven’t tried this yet, but the problem with this one I think is that the check isn’t in the loop, so it would simply skip an item rather than not include it at all, so you couldn’t output a particular number. Nor could you use pagination.
Cheers.
Can anyone offer any type of guide? I’ve tried half a dozen or more “solutions” found online, including code examples from ACF docs, and nothing is working. Surely someone must have done this??
So is there a solution for importing CSV data to repeater fields?
Can anyone else help out? I’ve seen a lot of “tips” online about doing this, but none seem to be based on the standard repeater code as per this example.
Thanks.
How is this not something being addressed by the developer??
Same issue here. No matter what I try it is defaulting to the first value, which is obviously not what should happen.
Will be using this myself, but like you if it could be improved I’d love to know.
Cheers.
I moved onto radio button, didn’t have time to debug with a very quick/low paying job. Radio button worked as expected with same code as used above.
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.