Double H1 tag

i have the problem that on every new page i create the h1 is the site title SCHERM REPARATIE ROTTERDAM on the top so now i have 2 h1 tags how i can change that?
normaly only the homepage have the Site Title h1 tag.

Hi There,

Because this requires a template change, I’d advise that you setup a child theme. This allows you to make code changes that won’t be overwritten when an X update is released. After your child theme is setup, please review how we recommend making template changes in Customization Best Practices.

Then navigate to your child theme’s x\framework\legacy\cranium\headers\views\global directory create a file named _brand.php and paste the code below:

<?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 . '">';

?>

<?php echo is_front_page() || is_home() ? '<h1 class="visually-hidden">' . $site_name . '</h1>' : ''; ?>

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

HI

there is already a file _brand.php there with this code

Hi There,

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
  • FTP credentials

Thanks.

yes i have provide to you

Any news Thai?

Hi There,

Thank you for the credentials, but I don’t see any x-child or x folder on your themes directory? Please clarify.

I want to clarify that, what Thai means above is the child theme’s \framework\legacy\cranium\headers\views\global directory.

That would be: \x-child\framework\legacy\cranium\headers\views\global
Not the: x\framework\legacy\cranium\headers\views\global

If that directory is not present on your child theme, please create it.

And it seems we are blocked by the Wordfence plugin, please deactivate that plugin while we still troubleshooting this issue.

Cheers!

hi plugin is disabled

it is directory /SITE

so in ftp it is:
schermreparatie/SITE

Hi,

I can see the code is in place, are you still getting the double h1 issue?

H1 with your site name will only appear in your home page or blog page.

If you want to remove it in there, you can remove this line of code.

<?php echo is_front_page() || is_home() ? '<h1 class="visually-hidden">' . $site_name . '</h1>' : ''; ?>

Hope that helps.