2011-12-17 105 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')); ?> 

为了不抛出一个错误,当该插件未被激活。