dongyuxin5353 2019-07-22 09:25
浏览 207
已采纳

函数中的the_custom_logo()在我检查元素时强制使用两个图像标记

I am working on a web page and I almost finished, but my logo doesn`t work. I need to do it via function the_custom_logo(). After I do that 2 image tags appear when I go to inspect element. I will post your picture and code.

After publishing logo in customize options in WordPress all I need is to call that custom logo function. But as you can see I have a big issue.

<a class="country-logo" href="<?php  echo site_url() ?>">
 <img class="country-logo-style" src="<?php the_custom_logo(); ?>" alt="Pro Denver Movers Logo" >
</a>

I just need this Denver logo to fit without second image showing.

I have a link to the webpage

http://prodenvermovers.wpupkeep.org/

You can check and inspect element here on webpage and see what is the actual problem.

Thanks.

  • 写回答

1条回答 默认 最新

  • dst2017 2019-07-22 09:36
    关注

    the_custom_logo will automatically echo the right HTML code to display the logo.

    try

     <a class="country-logo" href="<?php  echo site_url() ?>">
         <?php the_custom_logo(); ?>
        </a>
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 Python爬取指定微博话题下的内容,保存为txt
  • ¥15 vue2登录调用后端接口如何实现
  • ¥65 永磁型步进电机PID算法
  • ¥15 sqlite 附加(attach database)加密数据库时,返回26是什么原因呢?
  • ¥88 找成都本地经验丰富懂小程序开发的技术大咖
  • ¥15 如何处理复杂数据表格的除法运算
  • ¥15 如何用stc8h1k08的片子做485数据透传的功能?(关键词-串口)
  • ¥15 有兄弟姐妹会用word插图功能制作类似citespace的图片吗?
  • ¥15 latex怎么处理论文引理引用参考文献
  • ¥15 请教:如何用postman调用本地虚拟机区块链接上的合约?