Issue with Post Layout and x-landmark-header (updated)

Hi

I have created a layout for posts and in my global css have placed:

.post-template-default .x-header-landmark {
display: none;
}
However, when i do View Page Source of the rendered page, I find the following contents:

`   <header class="x-header-landmark">
  <div class="x-container max width">
    <div class="x-landmark-breadcrumbs-wrap">
      <div class="x-landmark">
          <h1 class="h-landmark"><span></span></h1>
      </div>
    </div>
  </div>
</header>`

Am I missing something? The problem being created is that I end up with 2 H1s. The H1 set within my layout is the right one and the one coming through the landmark, I do not need.

Could you please advice what I am doing wrong?

Janak

Hi Janak,

Thanks for reaching out.
It seems that you are using the Renew stack and set the Blog Option > Title blank. The structure with the h1 that you are referring to is coming from the Renew stack. If you want that to change, please use any different stack or else you can copy the following file and add it to the same folder hierarchy into your child theme and change the h1 to any other tag that you want.

Screenshot-417-

framework\legacy\cranium\headers\views\renew\_landmark-header.php

The above file should be added to the following folder structure in your child theme :

<childtheme>\framework\legacy\cranium\headers\views\renew\_landmark-header.php

Please note that we don’t investigate or support any issues related to the custom code or modified child theme.

Hope it helps.
Thanks

I developed the website without using child themes.

If i use a child theme now, would I need to revisit all the theme option settings etc?

Thanks

Hi Janak,

The child theme will not affect any Theme Options settings. If you have not created one yet, you can find a scratch child theme and the details here in this article: https://theme.co/docs/child-themes

Hope it helps.
Thanks

Thanks. Will try this.

Hi Janak,

You are most welcome. Please let us know if you find any further issue with this.

Hi
I did as stated. Installed the child theme. And copied the file across to the child theme folder.
I then replaced all the H1s to H4 in the -landmark-header.php file.

However, it doesn’t seem to have taken any effect and I am still seeing H1.

What could I be doing wrong? Attached the screenshot of the folder structure from showing from where to where I have copied the file and edited. Also attached the edited file now as present in the child theme folder.

The contents of the file are as follows:
<?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() ) : ?>

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

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

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

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

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

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

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

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

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

        <?php else : ?>

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

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

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

      <?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__' );

        ?>

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

      <?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__' );

        ?>

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

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

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

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

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

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

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

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

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

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

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

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

A rejoinder.

If I change the H1 to H4 for line 50 in the main theme it works. What could be the reason for the Child Theme change not being applied? Having checked, the child theme is activated for the website and the installation was successful without any issues.

Janak

Hi Janak,

Base on your screenshot above, it seems you did not create the necessary path on the child theme
framework\legacy\cranium\headers\views\renew\

Please create that path on your child theme and put the copied _landmark-header.php file on that directory.

Hope it helps,
Cheers!

Sorted. Thank you so much for all the help.

Janak

You’re most welcome,

Cheers!

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