Shortcode
All Shortcodes
Section titled “All Shortcodes”Shortcode is a special command that is enclosed in square brackets [...]. The Plant 3 theme has prepared the following shortcodes:
| Shortcode | Description |
|---|---|
| [s_social] | แสดงรายการโซเชียลตามที่ตั้งไว้ใน Customizer → Brand |
| [s_icon] | แสดงไอคอนจากไฟล์ในธีม ดูรายละเอียดด้านล่าง |
| [s_search] | แสดงไอคอน Seach เมื่อคลิก ระบบจะแสดงช่อง Search ขึ้นมา |
| [s_by] | แสดงชื่อผู้เขียน ใช้ใน Card หรือรายละเอียด Post เท่านั้น |
| [s_date] | แสดงวันที่ ใช้ใน Card หรือรายละเอียด Post เท่านั้น |
| [s_current_year] | แสดงปีปัจจุบัน นิยมใช้ใน Footer |
| [s_member] | แสดงไอคอนสำหรับล็อกอิน โดยลิงก์ไปที่หน้าสมาชิก (ค่าปกติคือ /my-account/) เมื่อล็อกอินแล้ว จะแสดงรูปสมาชิกแทน |
| [s_myaccount] | แสดงข้อมูลสมาชิก รูป, ชื่อ, ปุ่มล็อกเอาต์ แนะนำให้ใช้ที่หน้า My Account ตั้งค่าที่ WooCommerce → More Shop Settings |
| [s_cart] | แสดงไอคอนตะกร้าสินค้า พร้อมจำนวนสินค้าในตะกร้า (ต้องใช้ร่วมกับปลั๊กอิน WooCommerce) |
| [s_loop] | แสดง Content Item แบบต่างๆ ดูข้อมูลเพิ่มเติมที่ คู่มือการใช้งาน [s_loop] |
[s_icon]
Section titled “[s_icon]”ใช้คำสั่งในรูปแบบ [s_icon i=“NAME” width=“24” height=“24”] โดย
| ตัวแปร | รายละเอียด |
|---|---|
| i | คือชื่อไอคอน ดูรายชื่อที่ feathericons.com และรายชื่อด้านล่าง |
| width | ความกว้างของไอคอน หากไม่ระบุ จะใช้ค่า 24px |
| height | ความสูงของไอคอน หากไม่ระบุ จะใช้ค่าความกว้าง |
Examples
Section titled “Examples”| Shortcode | Result |
|---|---|
| [s_icon i=“check-circle”] | |
| [s_icon i=“check-circle” width=“20”] |
More from Seed Webs
Section titled “More from Seed Webs”The list of additional icons beyond Feather Icons