Remove all double H1 title in custom post Type

Hello There,

I created through a data base thousands of custom post page on my website
I have an issue with the double H1 title (THE BLOG and MYTITLE) in each post not desired.
I don’t see them on my page but SEO checker see this titles.

I would like to know for helping my developer how to remove this titles for all my custom post pages ?

Edit,
It is the same thing for my normal pages with H1 TITLE “MYTITLE”, I would like to delete it also.

Best Regards

Hi @Guillaumeg06,

Thanks for reaching out.

May I know the sample URL of this custom post type? This would need custom development if it’s related to custom post type templates that you created.

Thanks!

Dear Rad thank you for your reply

Find attached an example of one my custom post:

https://www.yachting-insurance.com/yacht/sanlorenzo/acionna-sl-82/

I have H1 TAG for “Yachting insurance” and “The Blog”

My developer says it is not link with his work but your Theme (Pro)

Best

Hi Guillaume,

The h1 titles on the custom posts seem to be part of the custom template made by your developer and is not part of the default template structure in Pro.

Kindly get in touch with your develop and have them update the heading tags for the custom posts titles.

Thank you.

Thank you for your quick reply,
on sitechecker.pro
https://sitechecker.pro/seo-report/https://www.yachting-insurance.com/yacht/sanlorenzo/acionna-sl-82/

They says I have 3 H1 Title but nothing on the page and that it is specific to your theme.

I created a simple post through pro and it is the same issue. I have 4 H1 title
https://sitechecker.pro/seo-report/https://www.yachting-insurance.com/test-title/
H1 TAG for “Yachting insurance” and “The Blog” come from you theme not from my developer and I would like delete them

Regards

Hi There @Guillaumeg06

With regard to your custom post types, you need to check your custom post templates and edit them accordingly.

There’s a common element comes with X/Pro themes which you can remove and it is the visually-hidden element. To remove visually hidden element, first you have to install and activate the child theme(https://theme.co/apex/forum/t/setup-how-to-setup-child-themes/57).

After, create this directory: pro-child/framework/legacy/cranium/headers/views/global/ in your child theme and create a file _brand.php file with the following code:

<?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>

With regard to your concerns about H1 tags, having multiple h1 was detrimental to SEO in the past. But, that is not the case now. X/Pro was built using HTML5 and having 2 h1 tags is structurally valid because they’re part of different areas. Also, in modern SEO in combination with HTML5, having multiple h1 will not have an impact on your ranking. X/Pro was built with SEO in mind so it’s structurally optimized. You should focus on quality content instead.

Let us know if you have any further questions.
Thanks!

Thank you for the clarification,

It will be the occasion to use the child theme,

Regards

Hello @Guillaumeg06,

Thanks for updating the thread.

Yes, we suggest you to setup child theme before making any changes. You can use following resources to download and setup child theme.

Download Child theme from following source: https://theme.co/apex/child-themes

Please take a look at following article to setup child theme:

Thanks.

Many Thanks for your help,

However The title H1 “Yachting Insurance” disappeared but the title “The Blog” is still there

I create all the folders to respect the directory pro-child/framework/legacy/cranium/headers/views/global/

I am missing something?

Regards

Hi Guillaume,

For that, login through FTP then go to pro-child/framework/legacy/cranium/headers/views/renew/ then create the file _landmark-header.php then add this code to the file:

<?php

// =============================================================================
// VIEWS/RENEW/_LANDMARK-HEADER.PHP
// -----------------------------------------------------------------------------
// Handles content output of large headers for key pages such as the blog or
// search results.
// =============================================================================

$disable_page_title = get_post_meta( get_the_ID(), '_x_entry_disable_page_title', true );
$breadcrumbs        = x_get_option( 'x_breadcrumb_display' );

?>

<?php if ( ! x_is_blank( 1 ) && ! x_is_blank( 2 ) && ! x_is_blank( 4 ) && ! x_is_blank( 5 ) ) : ?>
  <?php if ( is_page() && $disable_page_title == 'on' ) : ?>

  <?php else : ?>

    <header class="x-header-landmark">
      <div class="x-container max width">
        <div class="x-landmark-breadcrumbs-wrap">
          <div class="x-landmark">

          <?php if ( x_is_shop() || x_is_product() ) : ?>

            <h1 class="h-landmark"><span><?php echo x_get_option( 'x_renew_shop_title' ); ?></span></h1>

          <?php elseif ( x_is_bbpress() ) : ?>

            <h1 class="h-landmark"><span><?php echo get_the_title(); ?></span></h1>

          <?php elseif ( x_is_buddypress() ) : ?>
            <?php if ( x_buddypress_is_component_with_landmark_header() ) : ?>

              <h1 class="h-landmark"><span><?php echo x_buddypress_get_the_title(); ?></span></h1>

            <?php endif; ?>
          <?php elseif ( is_page() ) : ?>

            <h1 class="h-landmark entry-title"><span><?php the_title(); ?></span></h1>

          <?php elseif ( is_home() || is_single() ) : ?>
            <?php if ( x_is_portfolio_item() ) : ?>

              <h1 class="h-landmark"><span><?php echo x_get_parent_portfolio_title(); ?></span></h1>

            <?php else : ?>

              <h1 class="h-landmark"><span><?php echo x_get_option( 'x_renew_blog_title' ); ?></span></h1>

            <?php endif; ?>
          <?php elseif ( is_search() ) : ?>

            <h1 class="h-landmark"><span><?php _e( 'Search Results', '__x__' ); ?></span></h1>

          <?php elseif ( is_category() || x_is_portfolio_category() || x_is_product_category() ) : ?>

            <?php

            $meta  = x_get_taxonomy_meta();
            $title = ( $meta['archive-title'] != '' ) ? $meta['archive-title'] : __( 'Category Archive', '__x__' );

            ?>

            <h1 class="h-landmark"><span><?php echo $title; ?></span></h1>

          <?php elseif ( is_tag() || x_is_portfolio_tag() || x_is_product_tag() ) : ?>

            <?php

            $meta  = x_get_taxonomy_meta();
            $title = ( $meta['archive-title'] != '' ) ? $meta['archive-title'] : __( 'Tag Archive', '__x__' );

            ?>

            <h1 class="h-landmark"><span><?php echo $title ?></span></h1>

          <?php elseif ( is_404() ) : ?>

            <h1 class="h-landmark"><span><?php _e( 'Oops!', '__x__' ); ?></span></h1>

          <?php elseif ( is_year() ) : ?>

            <h1 class="h-landmark"><span><?php _e( 'Post Archive by Year', '__x__' ); ?></span></h1>

          <?php elseif ( is_month() ) : ?>

            <h1 class="h-landmark"><span><?php _e( 'Post Archive by Month', '__x__' ); ?></span></h1>

          <?php elseif ( is_day() ) : ?>

            <h1 class="h-landmark"><span><?php _e( 'Post Archive by Day', '__x__' ); ?></span></h1>

          <?php elseif ( x_is_portfolio() ) : ?>

            <h1 class="h-landmark"><span><?php the_title(); ?></span></h1>

          <?php endif; ?>

          </div>

          <?php if ( $breadcrumbs == '1' ) : ?>
            <?php if ( ! is_front_page() && ! x_is_portfolio() ) : ?>
              <div class="x-breadcrumbs-wrap">
                <?php x_breadcrumbs(); ?>
              </div>
            <?php endif; ?>
          <?php endif; ?>

          <?php if ( x_is_portfolio() ) : ?>
            <div class="x-breadcrumbs-wrap">
              <?php x_portfolio_filters(); ?>
            </div>
          <?php endif; ?>

        </div>
      </div>
    </header>

  <?php endif; ?>
<?php endif; ?>

And in line 50, you will find the code

<h1 class="h-landmark"><span><?php echo x_get_option( 'x_renew_blog_title' ); ?></span></h1>

You could either remove the entire line of change h1 to something else.

Hope this helps.

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