wordpress上傳圖片不自動生成縮略圖的解決方法
因為站點不需要顯示這么多圖片,只需要原圖就OK了,所以就要修改下媒體設置。打開設置->媒體,將不需要的縮略圖寬度高度都設置為0就可以了。如下圖:
但是這樣設置之后,還是會生成其它分辨率的縮略圖,筆者猜測應該是主題的問題,于是就去主題內(nèi)查找,筆者用的主題是themolio。后來在主題文件的functions.php中找到了這樣的代碼:
function themolio_setup() {</p> <p> /* Make Themolio available for translation.
* Translations can be added to the /languages/ directory.
* If you're building a theme based on Themolio, use a find and replace
* to change 'themolio' to the name of your theme in all the template files.
*/
load_theme_textdomain('themolio', get_template_directory().'/languages' );
add_editor_style();
add_theme_support('automatic-feed-links');
add_theme_support('post-thumbnails');</p> <p> /**
* This sets up the image size for the grid based top-down layouts (with no sidebar).
* If you change the width/height of your content,
* you will have to modify the width and height mentioned below as well
*/
add_image_size('themolio-two-col-grid-image-nosidebar',460,300,true);
add_image_size('themolio-three-col-grid-image-nosidebar',290,200,true);
add_image_size('themolio-four-col-grid-image-nosidebar',210,150,true);</p> <p> /**
* This sets up the image size for the grid based top-down layouts (with sidebar).
* If you change the width/height of your content,
* you will have to modify the width and height mentioned below as well
*/
add_image_size('themolio-two-col-grid-image-sidebar',356,250,true);
add_image_size('themolio-three-col-grid-image-sidebar',230,150,true);
add_image_size('themolio-four-col-grid-image-sidebar',171,110,true);</p> <p> /**
* This sets up the image size for the featured image.
* If you change the width/height of your content,
* you will have to modify the width and height mentioned below as well
*/
add_image_size('themolio-featured-image',800,300,true);</p> <p> register_nav_menu('primary', __('Primary Menu', 'themolio'));</p> <p> add_theme_support('post-formats', array('link', 'gallery', 'status', 'quote', 'image', 'video'));</p> <p> if(themolio_is_wp_version('3.4')) {
add_theme_support('custom-background');
} else {
add_custom_background();
}
}
其中add_image_size就是增加縮略圖設置的方法,根據(jù)需要注釋掉即可。其它主題也可以依此類推,只要搜索關(guān)鍵詞add_image_size,應當就能找到縮略圖的設置。
最后生成多張縮略圖的問題就搞定了。
友情提示
如果日后有需要縮略圖,可以在媒體->媒體庫->選擇需要的圖片點編輯->編輯圖片,然后就可以裁剪圖片了。最后報下wordpress和使用主題的版本:
wordpress是3.4.1版本
主題是Themolio,版本是1.2
欄 目:WordPress
下一篇:wordpress在IIS下偽靜態(tài)后子目錄無法訪問的解決方法
本文標題:wordpress上傳圖片不自動生成縮略圖的解決方法
本文地址:http://mengdiqiu.com.cn/a1/WordPress/12815.html
您可能感興趣的文章
- 05-31wordpress修改后臺登錄地址教程
- 05-31WordPress自定義用戶頭像實現(xiàn)代碼
- 01-11修改wordpress上傳臨時目錄解決wordpress無法安裝插件包的方法
- 01-11WordPress增加文章排序方式
- 01-11自己做wordpress評論插件修改評論樣式(兩步美化評論內(nèi)容)
- 01-11wordpress get
- 01-11wordpress獲取文章評論數(shù)過濾掉作者代碼分享
- 01-11在wordpress文章末尾添加內(nèi)容的簡單方法
- 01-11不用wordpress插件顯示文章瀏覽統(tǒng)計功能代碼修改(原理分析)
- 01-11wordpress dynamic


閱讀排行
本欄相關(guān)
- 05-31wordpress修改后臺登錄地址教程
- 05-31WordPress自定義用戶頭像實現(xiàn)代碼
- 01-11WordPress增加文章排序方式
- 01-11修改wordpress上傳臨時目錄解決wordpre
- 01-11wordpress get
- 01-11自己做wordpress評論插件修改評論樣式
- 01-11在wordpress文章末尾添加內(nèi)容的簡單方
- 01-11wordpress獲取文章評論數(shù)過濾掉作者代
- 01-11wordpress dynamic
- 01-11不用wordpress插件顯示文章瀏覽統(tǒng)計功
隨機閱讀
- 08-05DEDE織夢data目錄下的sessions文件夾有什
- 04-02jquery與jsp,用jquery
- 01-11ajax實現(xiàn)頁面的局部加載
- 01-10使用C語言求解撲克牌的順子及n個骰子
- 08-05織夢dedecms什么時候用欄目交叉功能?
- 01-10C#中split用法實例總結(jié)
- 01-10delphi制作wav文件的方法
- 08-05dedecms(織夢)副欄目數(shù)量限制代碼修改
- 01-10SublimeText編譯C開發(fā)環(huán)境設置
- 01-11Mac OSX 打開原生自帶讀寫NTFS功能(圖文