Pro child theme, _brand.php and removing duplicate H1

HI,

What is the correct way to add and edit the _brand.php file on Pro child theme?

I’ve installed the Pro child theme and followed the instructions in this thread regarding the _brand.php:

I’ve created the matching folder path under the child theme and removed the line from the PHP file which prints the H1 tag. But the H1 is still printed on each page. What I’m missing here?

Hi There,

That looks good!

Please make sure the code inside the _brand.php file is:

<?php

// =============================================================================
// VIEWS/GLOBAL/_BRAND.PHP
// -----------------------------------------------------------------------------
// Outputs the brand.
// =============================================================================

$site_name        = get_bloginfo( 'name' );
$site_description = get_bloginfo( 'description' );
$logo             = x_make_protocol_relative( x_get_option( 'x_logo' ) );
$site_logo        = '<img src="' . $logo . '" alt="' . $site_description . '">';

?>

<a href="<?php echo home_url( '/' ); ?>" class="<?php x_brand_class(); ?>" title="<?php echo $site_description; ?>">
  <?php echo ( $logo == '' ) ? $site_name : $site_logo; ?>
</a>

If it still doesn’t work, would you mind providing us with login credentials(by clicking on the Secure Note button at the bottom) so we can take a closer look? To do this, you can make a post with the following info:

  • Link login to your site
  • WordPress Admin username / password

Thanks.

Hi again @thai,

I just realized that the blank.php is related to the page templates labeled “blank” on the page settings. :sweat_smile: After switching to any of the “blank” templates the H1 tag was gone.

I had my test pages set to default template (I don’t know which template that uses).

Hello There,

The default page template will use the wp-page.php which loads the content-page.php. Please check the files for each respective stack folder because they are designed differently.

Hope this helps.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.