
內容簡介
**LIQUID TOOLS WordPress 外掛總結:**
LIQUID TOOLS 是一個簡單的 WordPress 外掛,可輕鬆管理自訂文章類型、分類和自訂欄位。它提供多項功能,包括自訂文章類型、分類以及欄位管理等。
**問題與答案:**
1. LIQUID TOOLS 外掛主要用途是什麼?
- 答:LIQUID TOOLS 是一個用於管理自訂文章類型、分類和自訂欄位的 WordPress 外掛。
2. 自訂文章類型中可以設定哪些項目?
- 答:可創建並管理具有獨特 slug、菜單圖示和功能性的自訂文章類型。
3. 如何添加自訂欄位到文章?
- 答:可以使用 text、textarea、url、email、number、image、checkbox、radio、select 等不同類型的自訂欄位。
4. 如何重複顯示欄位中的文字?
- 答:使用 foreach 迴圈以及 get_post_meta 函數即可重複顯示文字欄位中的數據。
5. 如何取得圖片欄位的資訊?
- 答:可使用 wp_get_attachment_url 函數來取得圖片欄位的 URL 資訊。
6. 如何在文章檢視器中區分不同自訂欄位?
- 答:可以透過設定自訂欄位的背景顏色來在文章檢視器中區分不同的欄位。
外掛標籤
開發者團隊
② 後台搜尋「LIQUID TOOLS – Simple Custom Fields & Custom Post Types」→ 直接安裝(推薦)
原文外掛簡介
LIQUID TOOLS is a simple plugin for WordPress that enables easy management of custom post types, taxonomies, and custom fields.
Features:
– Custom Post Types: Create and manage custom post types with unique slugs, menu icons, and capabilities.
– Custom Taxonomies: Create hierarchical or non-hierarchical taxonomies and link them to any post type.
– Custom Fields: Add custom fields to posts, including text fields, image uploads, URLs, and more.
– Repeating Fields: Supports repeating fields for text, images, and other field types.
– Flexible Display Options: Control the display order, position, and priority of custom fields in the post editor.
– Field Background Colors: Set background colors for custom fields to visually distinguish fields in the post editor.
– Thumbnail Support: Add thumbnails to the post admin list for selected post types.
Custom Fields
text
textarea
url
email
number
image
checkbox
radio
select
Custom Post Types
Capability
Archive
Hierarchical
Thumbnail
Revisions
Excerpt
Custom Taxonomies
Apply to Post Types
Hierarchical
Others
Add thumbnails to the post admin list.
latest information on LIQUID PRESS.
How to get custom field data
LIQUID BLOCKS plugin for easy to get field data.
Custom field block allows you to output custom field data with no code.
Supports block editors and block themes.
Another way, Get field data securely using WordPress core functions.
Text field
get_post_meta( $post->ID, 'key', true );
Repeat text fields
$key = get_post_meta( $post->ID, 'key', true );
foreach ( $key as $value ) {
echo esc_html( $value );
}
Image field
wp_get_attachment_url( get_post_meta( $post->ID, 'key', true ) );
Repeat image fields
$key = get_post_meta( $post->ID, 'key', true );
foreach ( $key as $value ) {
echo wp_get_attachment_url( esc_html( $value ) );
}
