WordPress タイトル文字を任意の画像ロゴに変更しセンター位置へ

以前、文字から画像の変更しましたものをセンター位置に持っていく方法。

style.cssとheader.phpを変更します。

■stye.css

header記述部分に
#site-title-logo {
    width: 330px; /* ロゴの高さ */
    height: 90px;  /* ロゴの横幅 */
    text-align: center;
    margin-right: auto;
    margin-left: auto;
}

■header.php

<h1 id=”site-title-logo”><span><a href=”<?php echo esc_url( home_url( ‘/’ ) ); ?>” title=”<?php echo esc_attr( get_bloginfo( ‘name’, ‘display’ ) ); ?>” rel=”home”><img src=”https://www.coralreference.com/wp-content/uploads/2012/02/logo.png” width=”330″ height=”90″ /></a></span></h1>

これで完了。