H1 Tag Issue

Is there a setting to change the hidden H1 tag an individual way?

It seems like the site title in the wordpress setting gets distributed as an H1 over every single page of the site which is not ideal.

I’d like to be able to customize it per page. Any idea on how I might do that?

Hi @upskillacademy,

Thanks for writing in.

You could follow the link below in regards to this concern.

Hope it helps.

Let us know how it goes.

Thanks.

Is there a way that does not require coding. I’m not that savvy yet.

Hello There,

The h1 tag is built in the theme. The only way to remove it is to override the settings in child theme. Because what you are trying to accomplish requires a template customization, we would highly to suggest that you use a child theme. This allows you to make code changes that won’t be overwritten when an X update is released.

Once you have your child theme active and ready, please follow the following steps below:
1] Using Notepad or TextEdit or Sublime Text or any text editor, please create a new file in your local machine.
2] Insert the following code into that new file

<?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 '<h2 class="visually-hidden">' . $site_name . '</h2>'; ?>

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

3] Save the file named as _brand.php
4] Upload this file to your server in the child theme’s folder wp-content/themes/x-child/framework/legacy/cranium/headers/views/global.

  • You will have to create the folder path since it does not exist in your child theme yet.

Please let us know how it goes.

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