WordPress主题制作

  1. 主页
  2. 文档
  3. WordPress主题制作
  4. 自定义Logo
  5. the_custom_logo

the_custom_logo

默认:

<?php the_custom_logo(); ?>

对应html

<a href="http://127.0.0.1/startbootstrap/" class="custom-logo-link" rel="home">
<img width="150" height="30" src="http://127.0.0.1/startbootstrap/wp-content/uploads/2020/03/cropped-timg-2.jpg" class="custom-logo" alt="startwordpress" />
</a>
<!-- logo处理 -->
<a href="http://127.0.0.1/startbootstrap/" class="custom-logo-link" rel="home">
<img width="1789" height="1344" src="http://127.0.0.1/startbootstrap/wp-content/uploads/2020/03/cropped-timg.jpg" class="custom-logo" alt="startwordpress" srcset="http://127.0.0.1/startbootstrap/wp-content/uploads/2020/03/cropped-timg.jpg 1789w, http://127.0.0.1/startbootstrap/wp-content/uploads/2020/03/cropped-timg-300x225.jpg 300w, http://127.0.0.1/startbootstrap/wp-content/uploads/2020/03/cropped-timg-600x451.jpg 600w, http://127.0.0.1/startbootstrap/wp-content/uploads/2020/03/cropped-timg-768x577.jpg 768w, http://127.0.0.1/startbootstrap/wp-content/uploads/2020/03/cropped-timg-1536x1154.jpg 1536w, http://127.0.0.1/startbootstrap/wp-content/uploads/2020/03/cropped-timg-666x500.jpg 666w" sizes="(max-width: 1789px) 100vw, 1789px" />
</a>>

这篇文章对您有用吗?

我们要如何帮助您?