在里面functions.php
:
function mymy_setup() {
// Add theme support for Custom Logo.
add_theme_support( \'custom-logo\', array(
\'width\' => 80,
\'height\' => 40,
\'flex-width\' => true,
) );
}
add_action( \'after_setup_theme\', \'mymy_setup\' );
在模板中:
<?php the_custom_logo(); ?>
HTML输出:
<a href="http://localhost/myweb/" class="custom-logo-link" rel="home" itemprop="url"><img width="80" height="40" src="http://localhost/myweb/wp-content/uploads/2016/12/cropped-cropped-1-2.jpg" class="custom-logo" alt="" itemprop="logo" /></a>
我需要的是:
<a href="http://localhost/myweb/"><img src="http://localhost/myweb/wp-content/uploads/2016/12/cropped-cropped-1-2.jpg" /></a>
如何在没有任何ID的情况下打印(&A);班(我也只能接受打印徽标URL)