2011-12-17 81 views
1

我試圖安裝一個WordPress主題,但它不會顯示完整的頁面,因爲我得到這個錯誤:WordPress的問題

Fatal error: Call to undefined function get_the_image() in /home/u629284378/public_html/1/wp-content/themes/Livosa/index.php on line 31 

的index.php線31:

< ?php get_the_image(array('custom_key' => array('image'), 'default_size' => 'thumbnail', 'width' => '180', 'height' => '150', 'image_class' => 'feature')); ?> 

回答

1

外貌喜歡你的主題取決於Get the Image WordPress插件。先安裝這個插件,激活它,然後嘗試你正在嘗試做的任何事情。

+1

此答案應被標記爲接受。 – ffarquet 2013-05-20 15:34:39

0

僅供參考,請注意if (function_exists

即使它不是你的主題,這是最好使用結構:

<?php if (function_exists('get_the_image')) get_the_image(array('custom_key' 
=> array('image'), 'default_size' => 'thumbnail', 'width' => '180', 'height' => '150', 
'image_class' => 'feature')); ?> 

爲了不拋出一個錯誤,當該插件未被激活。