> For the complete documentation index, see [llms.txt](https://manualwp.amfine.me/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://manualwp.amfine.me/edit-contents/posts.md).

# ข้อมูลที่ใช้ในหลาย Posts

{% hint style="warning" %}
Post ในที่นี้ หมายถึง List ข้อมูลที่อยู่ใน Custom Posts เช่น ใน Room Type จะมี List ข้อมูล Deluxe Room, Junior Suite ฯลฯ ซึ่ง Deluxe Room, Junior Suite ฯลฯ จะเรียกว่า Post
{% endhint %}

ส่วนใหญ่แล้วจะเป็นการใช้กับข้อมูลประเภท Gallery ที่จะมีแสดงผลทั้งหน้าแรก, หน้า Gallery, และหน้า Detail ต่างๆ หรือ จะเป็นข้อมูลของ Amenities ที่ในแต่ละ Rooms Type จะใช้งานเหมือนกัน

<figure><img src="/files/ZDngMMpSuciti9LmJGK4" alt=""><figcaption><p><strong>ตัวอย่าง: ข้อมูล Amenities และ Gallery ที่ในแต่ละ Rooms Type</strong></p></figcaption></figure>

{% hint style="warning" %}
การทำงานของโครงสร้างข้อมูลที่จะนำใช้ในหลาย Posts ในทาง Wordpress จะเรียกว่า "<mark style="color:blue;">**Post Object**</mark>"
{% endhint %}

### ขั้นตอนการแก้ไขข้อมูลที่ใช้ในหลาย Posts

การแก้ไขข้อมูลใน "Post Object" นั้น หากมีการแก้ไขแล้ว ทุก Post หรือ Custom Posts ที่มีการเรียกใช้ข้อมูลนั้นๆ จะทำการอัพเดดไปพร้อมกันทั้งหมด โดยที่ไม่ต้องทำการแก้ไขทีละจุด

ตามในตัวอย่างนี้ จะเป็นการแก้ไขข้อมูล "Amenities" ในส่วนของ "Air" เป็นคำว่า "Air conditioning" ซึ่งข้อมูล "Amenities" ได้มีการเรียกใช้ในหลายๆ Rooms Type มีขั้นตอนดังนี้

1. ทำการ "[**ล็อคอินเข้าสู่ระบบจัดการข้อมูลเว็บไซต์ (CMS Wordpress)**](https://sukontar-sadakorn.gitbook.io/manualwp/#cms-wordpress)"
2. หลังจาก Login เรียบร้อยแล้ว ระบบจะเข้าสู่หน้า Dashboard ให้คลิกที่เมนู "Rooms Type" เพื่อเข้าไปดูชื่อช่องที่กรอกข้อมูลว่าเป็นข้อมูลส่วนใด ตามตัวอย่างในทีนี้จะชื่อช่องว่า "Amenities"

<figure><img src="/files/A7MB4j4NAq6f3oWf7Ldi" alt=""><figcaption><p><strong>ตัวอย่าง: ข้อมูล "Amenities" ใน Custom Posts "Rooms Type"</strong></p></figcaption></figure>

3\. หลังจากนั้นให้คลิกที่เมนูตามที่ได้ตรวจสอบมาแล้วในขั้นตอนที่ 2 ในตัวอย่างนี้จะต้องคลิกที่เมนู "Amenities"&#x20;

<figure><img src="/files/31sNUrNUqSzNINv8ruM7" alt=""><figcaption></figcaption></figure>

4\. หลังจากนั้นเลือก Post ที่ต้องการแก้ไข ในตัวอย่างนี้จะเป็นการแก้ไขข้อมูลของ "Air" เป็นคำว่า "Air conditioning" ให้ทำการคลิกเลือก Post "Air"

<figure><img src="/files/ZEH34YhmqoCJJkfPNtKA" alt=""><figcaption></figcaption></figure>

5\. แก้ไขข้อมูลตามที่ต้องการ และคลิกที่ปุ่ม "<mark style="color:blue;">**Update**</mark>" ระบบจะทำการ Update ข้อมูล และนำไปแสดงผลในเว็บไซต์ทันที

<figure><img src="/files/MgjMihf6wwz6Rdj2ZGR0" alt=""><figcaption></figcaption></figure>

### ขั้นตอนการเพิ่มข้อมูลที่ใช้ในหลาย Posts

ในกรณีที่ต้องการเพิ่มข้อมูลอื่น ที่ของเดิมไม่ได้มีให้เลือกอยู่ ตัวอย่างเช่น ต้องการเพิ่ม "Minibar" ไปในส่วนของ "Amenities" แต่ในระบบแจ้งเตือนว่า "No resultes found" เพื่อให้ทำการเพิ่มข้อมูล "Minibar" ก่อนจึงจะเลือกข้อมูล "Minibar" ได้ โดยขั้นตอนการเพิ่มมี ดังนี้

1. ทำการ "[**ล็อคอินเข้าสู่ระบบจัดการข้อมูลเว็บไซต์ (CMS Wordpress)**](https://sukontar-sadakorn.gitbook.io/manualwp/#cms-wordpress)"
2. หลังจาก Login เรียบร้อยแล้ว ระบบจะเข้าสู่หน้า Dashboard ให้คลิกที่เมนู "Rooms Type" เพื่อเข้าไปดูชื่อช่องที่กรอกข้อมูลว่าเป็นข้อมูลส่วนใด ตามตัวอย่างในทีนี้จะชื่อช่องว่า "Amenities"

<figure><img src="/files/iYrwXsPEHEhD5ZRacF7C" alt=""><figcaption><p><strong>ตัวอย่าง: ข้อมูล "Amenities" ใน Custom Posts "Rooms Type"</strong></p></figcaption></figure>

3\. หลังจากนั้นให้คลิกที่เมนูตามที่ได้ตรวจสอบมาแล้วในขั้นตอนที่ 2 ในตัวอย่างนี้จะต้องคลิกที่เมนู "Amenities"

<figure><img src="/files/IR3xDhSnrwGd2RUnHlD2" alt=""><figcaption></figcaption></figure>

4\. คลิกที่ปุ่ม "<mark style="color:blue;">**Add New**</mark>" ซึ่งจะมีให้เลือกได้ 2 จุด คือ บริเวณมุมซ้ายของจอ และบริเวณใต้ Custom Posts ที่เลือกมา

<figure><img src="/files/c8NmRDQVauSKKeOCtC3h" alt=""><figcaption></figcaption></figure>

5\. หลังจากคลิกที่ปุ่ม "<mark style="color:blue;">**Add New**</mark>" แล้วให้ทำการกรอกข้อมูลตามที่ท่านต้องการ ซึ่งลักษณะของช่องให้กรอกอาจจะแตกต่างกันในแต่ละ Custom Posts หรือ ในแต่ละ Theme ที่ใช้งานอยู่ แต่จะมีลักษณะการทำงานคล้ายๆการ คือ การเป็นช่อง input ให้กรอกข้อมูล หลังจากนั้นให้คลิกที่ปุ่ม "<mark style="color:blue;">**Publish**</mark>"

<figure><img src="/files/O0AMD6fB9uTgREpU7Jx9" alt=""><figcaption></figcaption></figure>

6\. หลังจาก Add ข้อมูล Amenities ประเภทใหม่เรียบร้อยแล้ว ให้กลับไปคลิกที่เมนู "Rooms Type" หรือ Custom posts ที่ต้องการแก้ไข

<figure><img src="/files/IzoK6D2WxR3dH6gsfifs" alt=""><figcaption></figcaption></figure>

7\. หลังจากเข้าไปใน Post ที่ต้องการเพิ่มข้อมูลเรียบร้อยแล้ว ให้ทำการ Search ข้อมูลที่ได้ทำการเพิ่มไปใหม่ และคลิกเลือก หลังจากนั้นคลิกที่ปุ่ม "Update" ระบบก็จะทำข้อมูลนี้ไปแสดงผลทันที

<figure><img src="/files/IMbrl0fhY73A34GSHhhF" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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://manualwp.amfine.me/edit-contents/posts.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.
