
內容簡介
這是一個簡單的 WP 外掛,可在文章管理頁面添加 meta box,讓你上傳文章的標題圖片。
安裝方式
下載「Header Image Uploader Plugin」。
在 WordPress 後台中,請選擇「外掛」>「新增外掛」>「上傳外掛」,然後選取 ZIP 檔案上傳安裝。
啟用外掛。
完成!你可以在新增/編輯文章時,看到圖片上傳的 meta box。
把圖片輸出到頁面中的程式碼非常簡單,只需要使用以下的程式碼即可。
<?php /*$image = get_post_meta(get_the_ID(), '$key', true); */
$id = get_post_meta($post->ID, 'imhy', true);
$image = wp_get_attachment_image_src($id, 'full-size');
?>
<img src="<?php echo $image[0]; ?>" />
支援
聯繫外掛作者:Imran Ahmed Khan
開發者
你是想要貢獻開發這個外掛的開發者嗎?請前往聯繫我們。
外掛標籤
開發者團隊
原文外掛簡介
A simple WP plugin that adds a meta box in your post admin to allow upload the header image for your post.
Installation
Download the Header Image Uploader Plugin.
In your WordPress Administration, go to Plugins > Add New > Upload, and select the plugin ZIP file.
Activate the plugin.
Done! The image uploader meta box will appear on add/edit post.
Printing the image output is very simple. Just use this code in your template file.
ID, 'imhy', true);
$image = wp_get_attachment_image_src($id, 'full-size');
?>
Support
Contact the plugin author: Imran Ahmed Khan
Developer
Are you a developer want to contribute to develop this plugin? Go to Contact Us.
