Home › Forums › Add-ons › Repeater Field › Retreiving repeters subfields values from database › Reply To: Retreiving repeters subfields values from database
Thank’s for answering.
Hell Yes ! It sounds obvious but this does not retreive anything (empty result) …
This is the full code :
global $wpdb;
$prefix =$wpdb->prefix;
$tablename = $prefix."postmeta";
$sql = "SELECT * FROM {$tablename} WHERE meta_key LIKE %s GROUP BY meta_key";
$iconbox_contents = $wpdb->get_results( $wpdb->prepare( $sql, '_jst_iconbox_%_iconbox_content' ) );
if( $iconbox_contents )
{
foreach( $iconbox_contents as $boxcontent )
{
$field = get_field_object( $boxcontent->meta_key, get_the_ID() );
echo '<pre>'.print_r( $field, 1) .'</pre><hr>';//now this is empty
}
}
Still stuck with this…
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.