[WordPress] 外掛分享: RDV Category Image

首頁外掛目錄 › RDV Category Image
WordPress 外掛 RDV Category Image 的封面圖片
300+
安裝啟用
★★★★★
5/5 分(2 則評價)
97 天前
最後更新
0%
問題解決
WordPress 5.0+ PHP 7.4+ v1.1.0 上架:2021-09-14

內容簡介

RDV Category Image 外掛能夠讓你為分類、標籤或任何自訂分類設定一張圖片。請審視下面的程式碼片段,在分類頁模板或任何頁面或文章上顯示類別圖片。

使用範本標籤 rdv_category_image_url(); 和 php echo 函式來取得分類圖片 URL,然後在 image 標籤中使用它。

<?php if(function_exists('rdv_category_image_url')){ echo rdv_category_image_url();} ?>

在類別範本檔案中使用範本標籤 rdv_category_image(); 直接顯示類別圖片。

<?php if(function_exists('rdv_category_image')){ rdv_category_image(); } ?>

使用 shortcode 在頁面、文章或頁面建構器範本中顯示類別圖片。基本的沒有屬性的 shortcode [rdv_category_image] 只會在類別模板頁面上顯示特定的類別圖片。使用屬性 term_id 和 size 來顯示特定的類別圖片和大小。

[rdv_category_image]
[rdv_category_image term_id="10"]
[rdv_category_image size="thumbnail"]
[rdv_category_image term_id="10" size="thumbnail"]

外掛標籤

開發者團隊

⬇ 下載最新版 (v1.1.0) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「RDV Category Image」→ 直接安裝(推薦)
📦 歷史版本下載

原文外掛簡介

RDV Category Image plugin allows you to add an image to a category, tag, or any custom taxonomies. Please review the code snippets below to display a category image on the category page template or any page or post.

Use template tag rdv_category_image_url(); with php echo function to get the category image url and then use it in an image tag.

Use this template tag rdv_category_image(); in the category template file to display the category image directly.

Use the shortcode in page or post or a page builder template to display a category image. The basic shortcode without attributes [rdv_category_image] will only work on the category template page to display a specific category image. Use shortcode attributes term_id and size to display a specific category image and size.
[rdv_category_image]
[rdv_category_image term_id="10"]
[rdv_category_image size="thumbnail"]
[rdv_category_image term_id="10" size="thumbnail"]

延伸相關外掛

文章
Filter
Apply Filters
Mastodon