Tagged: x
-
AuthorPosts
-
August 8, 2016 at 2:27 am #1121700
Hi. I can see there are a lot of questions regarding this so apologies if the solution already exists, but I certainly cannot find it. I am using the Renew stack and the Blank – No Container | Header, Footer template. I have breadcrumbs and title turned on in the customiser and I do not have any of the relevant css set to display:none. What I am trying to achieve is to display the title and breadcrumbs using this template just like the default template. I cannot use the default template as it will not allow me to have ‘colour sections’ spanning the entire page. Any help would be greatly appreciated.
August 8, 2016 at 2:43 am #1121721Hi,
Thanks for writing in!
It is disabled by default for that template.
To enable it, kindly create file _landmark-header.php in wp-content/themes/x-child/framework/views/renew
and copy the code below into that 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( 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; ?>
Hope that helps.
August 8, 2016 at 6:04 am #1121941Hi Paul, I have done as you requested. I have checked my path, filename etc and flushed the cache. Still does not display the title bar or breadcrumb trail. Is there something I have to do enable the child theme, or does it pick up automatically?
August 8, 2016 at 6:13 am #1121957Hi Paul, I appear to have worked it out, I needed to install your child theme and then activate that. It works well now – I am guessing that I need to apply a class to hide it on the front page? I seem to remember seeing a post about that – I will persist. Many thanks for your help.
August 8, 2016 at 8:11 am #1122049Hi,
To hide the breadcrumbs in your front page, you can add this under Custom > Edit Global CSS in the Customizer.
.home .x-header-landmark { display:none; }
Hope that helps
-
AuthorPosts