Skip to content

Commit

Permalink
详情页二维码不显示
Browse files Browse the repository at this point in the history
当外链不存在时替换为当前文章链接
  • Loading branch information
jeeinn authored Dec 14, 2019
1 parent 41788ce commit 20fd6a8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions single-sites.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@

<p><?php echo get_post_meta(get_the_ID(), '_sites_sescribe', true) ?></p>
<?php
$qrurl="https://my.tv.sohu.com/user/a/wvideo/getQRCode.do?width=150&height=150&text=". $m_link_url;
$m_post_link_url = $m_link_url ?: get_permalink($post->ID);
$qrurl="https://my.tv.sohu.com/user/a/wvideo/getQRCode.do?width=150&height=150&text=". $m_post_link_url;
$qrname = "手机查看";
if(get_post_meta(get_the_ID(), '_wechat_qr', true)){
$qrurl=get_post_meta(get_the_ID(), '_wechat_qr', true);
Expand Down Expand Up @@ -141,4 +142,4 @@
</div>

</div>
<?php get_footer(); ?>
<?php get_footer(); ?>

0 comments on commit 20fd6a8

Please sign in to comment.