Twenty Seventeen Theme Customisation

How To Centre The Header Logo, Site Title & Description In Twenty Seventeen

Updated: September 18, 2018  Posted: February 22, 2017  ~ 2,895 Readers   ~ 1 Minute Read    5 Comments >>

The site branding elements in the header of Twenty Seventeen are left aligned. The logo, site title & description can be centred within the header.

The default header logo, site title & description.

The header logo, site title & description centred within the header.

Where and how to center the logo, site title & decription:

In WordPress Admin > Appearance > Edit CSS.

Enter the CSS code below.

The CSS code:

#masthead .wrap {
    /* position: relative; */
	text-align: center;
}

 



There are 5 comments to the above post [Read comments].
Click here to comment, ask or share something.

5 Comments

  • I just updated the reply above so that the code appears correctly.

  • Nazim says:

    Hi Bharat,
    How can we change the logo URL in twenty seventeen ?

    Actually, the logo redirects to home page.
    In fact, I would like to use the logo as a button that sends to a register page from anywhere in the site.

    • Nazim,
      First create a child theme as per here: https://codex.wordpress.org/Child_Themes

      Then copy the file from parent theme at /twentyseventeen/template-parts/header/site-branding.php

      In the file find the sections:

      <?php if ( is_front_page() ) : ?>
      <h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1>
      <?php else : ?>
      <p class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></p>
      <?php endif; ?>

      Change the a href links between the double quotes to where you want the links to go to.

  • Hello, ty for your tips, it is center my tittle and description but not my logo....
    Best regards

Ask & Share

Do NOT follow this link or you will be banned from the site!