回答編集履歴
2
追記修正
test
CHANGED
@@ -10,6 +10,6 @@
|
|
10
10
|
add_filter( 'wp_csv_exporter_image', function( $field, $post_id ) {
|
11
11
|
$image = get_field('image', $post_id);
|
12
12
|
return $image['url'];
|
13
|
-
}, 10,
|
13
|
+
}, 10, 2 );
|
14
14
|
```
|
15
15
|
|
1
追記修正
test
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
> Advanced Custom Fields PROのプラグインを使用しております。
|
2
2
|
|
3
|
-
Advanced Custom Fields の [Image](https://www.advancedcustomfields.com/resources/image/) を使用しているということでしょうか。
|
3
|
+
Advanced Custom Fields の [Image](https://www.advancedcustomfields.com/resources/image/) フィールドタイプを使用しているということでしょうか。
|
4
4
|
|
5
5
|
|
6
|
-
そうであれば、[WP CSV Exporter](https://ja.wordpress.org/plugins/wp-csv-exporter/) のドキュメントにある `wp_csv_exporter_{custom_field_key}` HOOKを利用して
|
6
|
+
そうであれば、[WP CSV Exporter](https://ja.wordpress.org/plugins/wp-csv-exporter/) のドキュメントにある `wp_csv_exporter_{custom_field_key}` HOOKを利用してACF の[get_field](https://www.advancedcustomfields.com/resources/get_field/) 関数を利用して、カスタムフィールド の URL を取得して、CSVに出力される内容を置き換えるのが簡単でしょうか。
|
7
7
|
|
8
8
|
たとえば、カスタムフィールドのスラッグが、 image の場合の例
|
9
9
|
```
|