H1 tag gets added automatically. Secure message with more details
Hello There,
Thanks for posting in! By default, <h1> tag is coded as the site title. If you want to get rid of this tag, since 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 '<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>
3] Save the file named as _brand.php
4] Upload this file to your server in the child theme’s folder wp-content/themes/pro-child/framework/legacy/cranium/headers/views/global/
You will need to create the folder path first since it does not exist in your child theme yet.
Please let us know how it goes.
So this is really the only option? We can’t apply some CSS or something simple to stop X/Pro from putting an H1 tag on every page?
Hi There,
That’s the HTML template so we can’t remove it by the custom CSS or Javascript.
Regards!
How about a button within X/Pro theme options that just disables the feature. An on/off button?
Hello @flacnvinyl,
Thanks for updating the thread.
Unfortunately that’s not possible. You can have the option to tinker with the styling but in any ways <h1> tag code is still being used. My colleague @RueNel has shared the solution in a step by step manner. Request you to please follow the guidelines. To upload the file into the server, you will need FTP softwares like Filezilla. Please take a look at following tutorial to get started.
Thanks.
Already done. Very familiar with FTP. I was just making a feature request. The amount of support requests regarding duplicate H1 tags due to this built in feature is staggering.
Hello @flacnvinyl,
Thanks for updating the thread.
I will record add your voice into our issue tracker. I can’t share ETA but rest assured, our developers are at work.
Thanks for understanding.
This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.