
內容簡介
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"]
外掛標籤
開發者團隊
原文外掛簡介
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"]
