开发者

This short PHP code works only in Firefox?

My question is about WordPress, but it might just be a general PHP question...I'm trying to make a custom download button for my single posts, so I added the following code in my single.php

<div id="downloadbutton">
  <?php if(get_post_meta($post->ID, "download_link", $single = true) != ""){ ?>
  <a href="<?php echo get_post_meta($post->ID, "download_link", $single = true开发者_C百科); ?>"<img src="example.png" border="0"></a>
  <?php } ?>
</div>

For some reason, the download button shows up only in Firefox browser, but not in Chrome or IE...

Any tips?


You need to close the <a> tag:

  <a href="<?php echo get_post_meta($post->ID, "download_link", $single = true); ?>"><img src="example.png" border="0"></a>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜