ACF attachment custom field in rest response

Check out ACF to REST API – https://github.com/airesvsg/acf-to-rest-api You can optionally turn on/off which fields you want to enable. // Enable the option show in rest add_filter( ‘acf/rest_api/field_settings/show_in_rest’, ‘__return_true’ ); // Enable the option edit in rest add_filter( ‘acf/rest_api/field_settings/edit_in_rest’, ‘__return_true’ );

Minimising number of queries on a page when using Advanced Custom Fields

Performance optimization doesn’t really work in vaccum, it takes hands-on profiling an looking for actual bottle necks (which often turn out to be different from perceived ones). But it general there are several approaches to the need of lots of database data: Optimize fetching from database, for example by concatenating multiple requests into retrieving single … Read more

Show custom field from custom taxanomy term on custom post type

Use the get_the_terms function instead so you can build the list manually and access the term_id for each term. $terms = get_the_terms( $post->ID, ‘taxanomy-name’ ); echo ‘<ul>’; foreach( $terms as $term ): echo ‘<li>’; echo $term->name; the_field( ‘custom-field-name’, ‘taxanomy-name_’ . $term->term_id ); echo ‘</li>’; endforeach; echo ‘</ul>’;

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)