Help using acf/save_post hook to connect to Untappd API and update_field [closed]

It’s because your require_once ‘Pintlabs/Service/Untappd.php’; is relative to “current” file and should be absolute path. I don’t know where are you using this hook but depending on location it should look something like this: ABSPATH is your wordpress root dir and ‘custom-path’ should be a path to Pintlabs dir require_once ABSPATH.’custom-path/’.’Pintlabs/Service/Untappd.php’; get_template_directory() if you use … Read more

Advanced Custom Fields [closed]

OK, after playing for a while, I solved my issue with the following code: <?php $field = get_field(‘introduction’); if(!empty ($field)){ ?> <div class=”sc-project-type”> <h4>Introduction:</h4> <?php echo ($field); ?> </div> <?php } ?>

Unkown meta_value in ACF

For every meta value saved there is a second row prefixed with _ that stores what field definition this value refers to. Do not delete it. Your example additionally is a repeater which makes it more complex but the docs has a nice explanation: $ParentName_$RowNumber_$ChildName So you have a repeater field called carousel which has … Read more

Get a list of ACF Repeater-Fields as array

Holy loop attack Batman! I think you can simplify this a lot: $the_posts = get_posts( array( ‘posts_per_page’ => ‘-1’, ‘post_type’ => ‘artists’, ‘meta_query’ => array( ‘relation’ => ‘AND’, array( ‘key’ => ‘date’, ‘value’ => date( ‘Ymd’ ), ‘compare’ => ‘<‘, ), ) )); $the_list = array(); foreach ( $the_posts as $the_post ) { if ( … Read more

Group by custom field value (start and end times)

try this wich first stack all posts with same times $tabEvent = []; foreach ( $rand_posts as $post ) { setup_postdata( $post ); $start_time = get_field(“start_time”); $end_time = get_field(“end_time”); $index = “$start_time|$end_time”; // store all the posts with same times if (!isset($tabEvent[$index])) { $tabEvent[$index] = []; } $tabEvent[$index][] = $post; } foreach ($tabEvent as $index … Read more