# カスタムフィールから画像を読み込ませる

### プラグイン Custom Field Template を使う

{% embed url="<http://www.review-rank.net/?p=11312>" %}

上記記事を参考にする。

### 他のプラグインAdvanced Custom Fieldsもみてみる

{% embed url="<https://www.kerenor.jp/acf-install-and-settings/>" %}

* プラグインに追加、有効化
* 管理画面左側、車輪マーク、カスタムフィールド→フィールドグループの画面が開く
* フィールドグループを新規作成
* フィールドラベルはユーザーが入力する際に表示される名前。感じでもいい。
* フィールドネームは php から参照する際に必要になる名前なので、英語で。

```php
// 文字列がそのままでる
<?php the_field('store_name') ?>

// php の値として返ってくる
<?php get_field('field_name') ?>

// なので get_field の場合は以下のような使い方になる
<?php echo get_field('field_name') ?>
<?php if(get_field('field_name')) ?>
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://super-yusuke.gitbook.io/wordpress-memo/kasutamufurukarawomimaseru.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
