Forum Replies Created

  • Is there any additional documentation for adding styles when registering ACF blocks? I can’t find anything in the ACF documentation, but I could be missing it.

  • I figured it out… for anyone that’s looking for the answer:

    $terms = get_field('portfolio');
                                     usort($terms, function($a, $b) {return strcmp($a->name, $b->name);});
                                     if( $terms ):
                                         echo '<ul>';
                                         foreach( $terms as $term ):
                                           echo '<li>';
                                             $name = $term->name;
                                             echo $name;
                                           echo '</li>';
                                         echo '</ul>';
  • For future reference, this function is referred to here:

    It will work if you use the selector within the input name. Should be something such as acf[field_5b1e124565677].

    acf_add_validation_error( 'acf[field_5b1e124565677]', 'Required' );

Viewing 3 posts - 1 through 3 (of 3 total)

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 Cookie Policy. If you continue to use this site, you consent to our use of cookies.