Site Editor Guide

Site Editor Guide — Art Tutor Hanoi

Hướng dẫn chỉnh sửa website tại /guide/. Nội dung tự động đồng bộ từ theme khi admin đăng nhập WP hoặc upload code mới — không cần sửa tay page này (chỉnh trong inc/guide-page.php nếu là dev).

1. Công cụ ATH Content

WP Admin → Tools → ATH Content (mở)

  • legacy — luôn dùng file PHP trong theme (rollback nhanh).
  • hybrid — trang đã migrate dùng Gutenberg; trang động vẫn PHP.
  • gutenberg — ưu tiên editor khi có nội dung.
  • Run migration — export partial PHP → editor (about, pricing, courses, kids-courses, workshops).
  • Rebuild homepage — toàn bộ section trang chủ thành shortcode (hero → testimonials → community).
  • Update Guide now — đồng bộ lại trang hướng dẫn từ theme.
  • Restore DB content backup — khôi phục nội dung editor trước migration.

2. Trang chủ (Homepage)

Trang chủ = page tại Settings → Reading → Homepage. Sửa trong Pages → [homepage] → Edit. Block động = block Shortcode (dán cả chuỗi kèm tham số vào một dòng).

2a.
— Video banner

Ảnh poster hiện trước khi video chạy. Video: video_url (khuyên dùng) hoặc video_id + video_version (Cloudinary).

Tham sốÝ nghĩaMặc định
aria_labelNhãn accessibilityArt studio
posterẢnh chờ video — assets/images/ hoặc URLhero2.jpg
video_urlURL .mp4 đầy đủ(trống)
video_idPublic ID CloudinaryBanner_tmdhl6
video_versionVersion Cloudinaryv1780352977
video_widthMax width (px)1920
cloudinary_folderGhi chú foldervideo
autoplay, muted, loop, playsinline1 hoặc 01
preloadauto | metadata | noneauto

video_id / video_version: từ URL Cloudinary .../v1780352977/Banner_tmdhl6.mp4.

[ath_home_hero aria_label="Art studio" poster="hero2.jpg" video_url="https://res.cloudinary.com/dwy4wtjtc/video/upload/q_auto,w_1920,c_limit/f_auto/v1780352977/Banner_tmdhl6.mp4" video_width="1920" cloudinary_folder="video" autoplay="1" muted="1" loop="1" playsinline="1" preload="auto"]

2b.

2-Hour Workshops

Perfect for travelers. Discover local culture and create your own unique Hanoi artwork

View Workshops

Weekly Art Courses

Weekly classes for adults and kids to build long-term art skills

View Courses

Trial Class

Try a single taster session to test our teaching style before joining long-term

Book a Trial

Artist Residency

Dedicated studio space and mentorship for local and international professional artists

Apply now
— 4 thẻ dưới hero

Thẻ từ data/{source}.php — mỗi thẻ: title, desc, link, link_type (experience | page | url).

Tham sốÝ nghĩaMặc định
sourceFile datahome-cards
buttonChữ nútView Courses
aria_labelNhãn sectionFeatured programs
[ath_home_cards source="home-cards" button="View Courses" aria_label="Featured programs"]

2c. — Gallery collage

PHP động (shuffle, lazy-load). Ảnh từ data/{source}.php.

Tham sốÝ nghĩaMặc định
introText trên gallery(text studio)
sourceFile datafrontpage-gallery
cloudinary_folderGhi chú folderwebsite/image/frontpage
visibleẢnh hiện ngay5
load_moreẢnh khi Load more; 0 = còn lại0
shuffle1 = xáo mỗi lần load1
buttonChữ nút Load moreLoad more photos
[ath_home_gallery source="frontpage-gallery" cloudinary_folder="website/image/frontpage" visible="3" load_more="0" shuffle="0" button="Load more photos"]

2d.

Structured programs for every stage of your artistic journey in Hanoi.

— Structured programs (Our courses)

Danh sách khóa học trên trang chủ — mỗi dòng link tới /courses/#anchor. Dữ liệu từ data/{source}.php — mỗi item: num, title, anchor.

Tham sốÝ nghĩaMặc định
sourceFile datahome-programs
labelNhãn nhỏ (Our courses)(từ data)
headingTiêu đề section(từ data)
courses_pagePage key cho linkcourses
footer_labelLink dưới cùngExplore all courses
aria_labelNhãn accessibilityStructured programs
[ath_home_programs source="home-programs" label="Our courses" heading="Structured programs for every stage of your artistic journey in Hanoi." courses_page="courses" footer_label="Explore all courses" aria_label="Structured programs"]

2e.

150+ artists from 40+ countries
have studied at Art Tutor Hanoi.

— Artist community

Carousel học viên (Posts category Learner’s artworks) — PHP động, sắp xếp theo comment mới nhất. Dòng thống kê từ data/home-community.php hoặc tham số stat (hai dòng cách nhau bằng |).

Tham sốÝ nghĩaMặc định
sourceFile datahome-community
statText thống kê (dòng1|dòng2)(từ data)
limitSố thẻ carousel6
always_visible1 = luôn mở (homepage)1
footer_labelLink dưới carouselView all
view_all_pagePage key hub artworksstudents-artworks
aria_labelNhãn accessibilityArtist community

Thêm học viên vào carousel: Posts → Add New → category Learner’s artworks → Featured image + publish. Không sửa file data.

[ath_home_community source="home-community" stat="150+ artists from 40+ countries|have studied at Art Tutor Hanoi." limit="6" always_visible="1" footer_label="View all" view_all_page="students-artworks" toggle_show="View Community" toggle_hide="Hide Community" panel_id="community-panel" toggle_id="community-toggle" aria_label="Artist community"]

2f.

Testimonials

What our students say

Perfect! In three days I learned a lot about sketching. The whole team is extraordinary. I recommend it to everyone and I hope to come back soon to Hanoi and Art Tutor Hanoi!

Marc Dunand-Roux (France)

Our teacher Giang was jovial and fun! Spoke good English and tried her best to keep my 4-year-old engaged and experimenting with different mediums.

Nicholas Teoh (Singapore)

My family gifted me a series of 3 Vietnamese silk painting classes at Art Tutor Hanoi, and it was a completely new experience for me...

Claire Helouet (France)

We loved it! We were a family of 7 with four kids, including one with a disability. The staff did an amazing job making art doable for everyone with extra care and kindness. A total highlight of our trip!

Joey & Jasmine Tell (USA)

Spent two weeks here for a tailored watercolor course (44h in total). They made sure it was the real deal – not just another YouTube-surface-lesson. The perfect place to take your art to the next level!

Theo Coppen (Sweden)

Students at an art exhibition
— Testimonials slider

Slider đánh giá + ảnh bên phải. Nội dung từ data/{source}.php — mỗi slide: text, author. JS slider dùng track_id / dots_id (mặc định testimonials-track).

Tham sốÝ nghĩaMặc định
sourceFile datahome-testimonials
labelNhãn nhỏTestimonials
headingTiêu đềWhat our students say
photoẢnh — assets/images/ hoặc URLgallery/HTT_1707.jpg
photo_altAlt ảnh(từ data)
aria_labelNhãn accessibilityTestimonials
[ath_home_testimonials source="home-testimonials" label="Testimonials" heading="What our students say" photo="gallery/HTT_1707.jpg" photo_alt="Students at an art exhibition" track_id="testimonials-track" dots_id="testimonials-dots" prev_label="Previous review" next_label="Next review" aria_label="Testimonials"]

3. — Nút chuẩn (dùng mọi trang)

Nút teal giống thẻ trang chủ (.btn-view). Dùng block Shortcode trong bất kỳ page Gutenberg nào — thay cho nút mặc định của editor.

Tham sốÝ nghĩaMặc định
labelChữ trên nút (bắt buộc)
linkSlug / page key / URL (bắt buộc)
link_typeexperience | page | book | urlurl
styleview | contact | ctaview
aligncenter | right (trống = trái)(trống)
newtab1 = mở tab mới0

Ví dụ link_type: page + courses → /courses/; experience + life-drawing → workshop; book + adults → tab Book.

[ath_btn label='View Courses' link='courses' link_type='page' style='view']

Xem trước:

View Courses

4. Thêm hoặc sửa Page

  • Page thường — Pages → Add New.
  • Trang migrate (about, pricing, …) — Pages → Edit; reset bằng migration + Overwrite.
  • Homepage — Rebuild homepage trong ATH Content.
  • Template — Default.
  • Permalinks — Save sau khi thêm slug mới.

5. Hồ sơ học viên mới

  1. Posts → Add New
  2. Category: Learner’s artworks
  3. Paragraph đầu = mô tả hero profile
  4. Featured image = thumbnail trên Students’ Artworks
  5. Publish

6. Trang không sửa Gutenberg

  • Book, Weekly calendar, Thank you, Links, Students’ Artworks hub
  • /courses/{slug}/, /workshops/{slug}/ — Pages con (template Course / Workshop), chỉnh Gutenberg sau migration
  • /kids-courses/{slug}/ — file data/*.php

7. Fluent Form #40 — Adult Booking (Date & time slots)

Form đặt chỗ người lớn nhúng tại /book/?tab=adult. Quy tắc DatePreferred time slots nằm trong Custom Javascript của form — không sửa trong theme trừ VietQR (mục 7d).

Mở editor: WP Admin → Fluent Forms → All Forms → Adult Booking (ID 40) → tab Settings & IntegrationsCustom CSS/JS → ô Custom Javascript → Save Form.

7a. Tên field (phải khớp trong JS)

Field trên formName attributeLoại
ProgramdropdownDropdown
Workshopdropdown_1Dropdown (conditional)
DatedatetimeDate/time (flatpickr)
Preferred time slottime_slotsRadio — một lựa chọn; Value từng option phải khớp JS
Number of participantsitem-quantityItem Quantity

7b. Quy tắc Date (calendar)

Điều kiệnDate picker
Program = Art ResidencyMọi ngày đều chọn được
Program khác Art ResidencyThứ 5 bị mờ — không chọn
Workshop = Nude model drawingChỉ thứ 7 (Saturday)

Trong JS: getDay() === 2 = thứ 3, getDay() === 4 = thứ 5 (Date), getDay() === 6 = thứ 7 (0 = Chủ nhật).

7c. Quy tắc time slots

Slot (Value trên form)Chỉ chọn khi
13;30 – 16:00Workshop = Nude model drawing (lưu ý dấu ; trong form hiện tại)
18:30 – 20:30Date đã chọn là thứ 3
Các slot khácBình thường (trừ khi bị rule Nude model khóa)

Đổi Date sang ngày không phải thứ 3 → slot 18:30 tự bỏ chọn và mờ. Đổi Workshop khỏi Nude model → các slot khác mở lại.

7d. Sửa rule — chỉnh biến đầu Custom Javascript

Sau khi đổi label/value option trong form editor, cập nhật các hằng số ở đầu file JS (phải trùng Value của option, không chỉ label hiển thị):

var RESIDENCY = 'Art Residency';
var NUDE_MODEL = 'Nude model drawing';
var NUDE_SLOT = '13;30 u2013 16:00';
var TUESDAY_SLOT = '18:30 u2013 20:30';
  • Thêm rule Date mới — sửa getDisableRules()isDateAllowed().
  • Thêm rule slot mới — thêm biến var MY_SLOT = '...'; và nhánh trong isSlotAllowed().
  • Đổi tên field — tìm select[name="dropdown"], dropdown_1, datetime, input[name="time_slots"] trong JS và đổi cho khớp Name Attribute.
  • Sửa label slot trong form — mở Radio Time slots → từng option → copy cột Value → dán vào JS (ký tự en-dash phải giống hệt; có thể dùng u2013 trong chuỗi JS).
  • Test — Preview form: thử từng Program/Workshop, chọn Date, chọn một slot; mở DevTools Console nếu có lỗi JS.

7e. Thanh toán & VietQR (tham khảo)

  • Giá — Calc Value trên Program / Courses / Duration; Custom Payment Amount công thức (Program + Courses + Duration); Item Quantity map payment_input.
  • VietQR — theme config/fluent-qr.php (form 40, tỉ giá USD→VND 26 500). Custom HTML cần #qr_amount#qr_img.
  • Form ID tab Adult — mặc định 40 (ATH_ADULT_BOOKING_FORM_ID trong config/book-tabs.php).

8. Rollback

  • Backup file: backup/pre-gutenberg-snapshot/
  • ATH Content → legacy / Restore DB backup
Chat with us