WordPress.org

Ready to get started?Download WordPress

Forums

DW Minion
remove h1 tag from logo (2 posts)

  1. linkback
    Member
    Posted 4 months ago #

    Hi,

    I dont understand were to remove the h1 tag from my site logo. I have a Static Front Page and just want that title text to be the only h1 tag on the page.

    Please help me.

  2. Maria Antonietta Perna
    Member
    Posted 4 months ago #

    Hi, going through your theme's code, I've found that the logo is added via a function, called dw_minion_logo(), which you can find in inc/extras.php. What you can do is to rewrite the same function and either call it the same way (or change its name and adjust the code in the HTML page template when calling this function if you only intend to apply this change on a specific page but not sitewide), in the functions.php file of your child theme. The code snippet to look out for is:

    echo '<h1 class="site-title '.$header_display.'"><a href="'.esc_url( home_url( '/' ) ).'" title="'.esc_attr( get_bloginfo( 'name', 'display' ) ).'" rel="home">';
      if ($header_display == 'display-logo') {
        echo '<img alt="'.esc_attr( get_bloginfo( 'name', 'display' ) ).'" src="'.$logo.'" />';
      } else {
        echo get_bloginfo( 'name' );
      }
      echo '</a></h1>';

    Replace the opening h1 and closing /h1 with whatever other tag you prefer.

Reply

You must log in to post.

About this Theme

About this Topic

Tags

No tags yet.