从自定义字段中提取的img不会在wordpress上显示

时间:2014-02-18 15:13:44

标签: html css image tags

不知怎的,我无法从我的wordpress主页中显示的帖子中的自定义字段中提取图片。

我正在使用来自imgurl

的hotlinked图片

img源代码确实出现在html源代码中,看起来很好,如下所示:

<li style="float:left;width:33.3%;display: inline;"><img scr="http://i.imgur.com/xxxxxxx.jpg" width="150" height="100" />......

奇怪的是,当我将相同的img标记源代码粘贴到一个单独的部分时,图像显示得很好,但是在使用自定义字段时不知何故,即使源代码似乎是正确的。

这是我正在使用的php,css和html代码,链接和css格式正确显示:

<ul style="width:600px;margin-left: 40px;padding: 0;list-style-type: none;text-transform:uppercase;">
<li style="float:left;width:33.3%;display: inline;"><img scr="<?php echo get_post_meta( get_the_ID(), 'homethumb', true ) ?>" width="150" height="100" /><a style="display: inline;" href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></li>
</ul>

PD:图像大小与img宽度和高度标记中指示的大小完全相同。

谢谢,希望有人可以帮我解决这个问题。

0 个答案:

没有答案