1. 主页
  2. 文档
  3. 2020主题解剖
  4. 2020主题:模板标签
  5. twentytwenty_site_logo

twentytwenty_site_logo

<?php the_custom_logo(); ?>

对应html:

<a href="http://127.0.0.1/twentytwenty/" class="custom-logo-link" rel="home">
<img width="316" height="236" style="height: 236px;" src="http://127.0.0.1/twentytwenty/wp-content/uploads/2020/08/cropped-plugin.jpg" class="custom-logo" alt="twentytwenty" srcset="http://127.0.0.1/twentytwenty/wp-content/uploads/2020/08/cropped-plugin.jpg 632w, http://127.0.0.1/twentytwenty/wp-content/uploads/2020/08/cropped-plugin-300x225.jpg 300w" sizes="(max-width: 632px) 100vw, 632px" />
</a>	
<?php
// Site title or logo.
twentytwenty_site_logo();

对应html

<h1 class="site-logo">
<a href="http://127.0.0.1/twentytwenty/" class="custom-logo-link" rel="home">
<img width="316" height="236" style="height: 236px;" src="http://127.0.0.1/twentytwenty/wp-content/uploads/2020/08/cropped-plugin.jpg" class="custom-logo" alt="twentytwenty" srcset="http://127.0.0.1/twentytwenty/wp-content/uploads/2020/08/cropped-plugin.jpg 632w, http://127.0.0.1/twentytwenty/wp-content/uploads/2020/08/cropped-plugin-300x225.jpg 300w" sizes="(max-width: 632px) 100vw, 632px" />
</a>
<span class="screen-reader-text">twentytwenty</span>
</h1>
					

这篇文章对您有用吗?

我们要如何帮助您?