add_filter( 'mwai_contentaware_content', 'mwai_parser_contentaware_content_acf', 10, 2 ); add_filter( 'mwai_pre_post_content', 'mwai_parser_pre_post_content_acf', 10, 2 ); function mwai_parser_contentaware_content_acf( $content, $post ) { $id = $post->ID; $content .= get_content_from_acf( $id ); return $content; } function mwai_parser_pre_post_content_acf( $content, $post_id ) { $content .= get_content_from_acf( $post_id ); return $content; } function get_content_from_acf( $post_id ) { $content = []; $fields = get_fields( $post_id ); foreach ( $fields as $key => $value ) { if ( is_array( $value ) ) { if ( isset( $value['url'] ) ) { $content[] = "{$key}:({$value['url']})"; } } if ( is_string( $value ) ) { $content[] = "{$key}:{$value}"; } } return implode(" ", $content); }
[wp_login_form]