Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1171145
    xthemer
    Participant

    Hi there,

    Question 1: I would like the breadcrumbs on my site to appear above the page title/h-landmark. The default setting is to the right. How can this be changed? I am not using a slider.

    Question 2: I don’t want the home icon in the breadcrumbs, but the navigation label. How can this be changed?

    Thanks!

    #1171148
    Christopher
    Moderator

    Hi there,

    Please add following code in Customize -> Custom -> CSS :

    .x-breadcrumbs {
        width: 100%;
        display: block;
        float: none;
    }
    .x-breadcrumbs i.x-icon-home:before {
        content: "Home";
    }

    Hope that helps.

    #1171170
    xthemer
    Participant
    This reply has been marked as private.
    #1171236
    Paul R
    Moderator

    Hi,

    For #1

    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">
          <?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; ?>
            <div class="x-landmark-breadcrumbs-wrap">
              <div class="x-landmark">
    
             <?php if ( x_is_shop() || x_is_product() ) : 
        global $post;
        $terms = get_the_terms( $post->ID, 'product_cat' );
     
     if(isset($terms[0]->name) && !empty($terms[0]->name)):
    ?>
         <h1 class="h-landmark"><span><?php echo $terms[0]->name; ?></span></h1>
    <?php else:?>
          <h1 class="h-landmark"><span><?php echo x_get_option( 'x_integrity_shop_title' ); ?></span></h1>
    <?php endif; ?>
    
              <?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 ( x_is_portfolio() ) : ?>
                <div class="x-breadcrumbs-wrap">
                  <?php x_portfolio_filters(); ?>
                </div>
              <?php endif; ?>
    
            </div>
          </div>
        </header>
    
      <?php endif; ?>
    <?php endif; ?>
    

    Then add this in Custom > Edit Global CSS in the customizer

    
    
    .x-breadcrumbs-wrap {
        width: 100%;
        text-align: left;
        margin-bottom: 10px;
        display: block;
        clear:both;
        overflow:hidden;
    }
    

    hope that helps.

    #1171394
    xthemer
    Participant

    Thanks for this Paul,

    I was able to change the position as required with the details you provided.

    If my vote is worth anything, I think the breadcrumbs position at the very least should be part of cornerstone’s customizing features.

    At least in my case, it would have meant less work both on my end and yours. Having to deal with php files is not necessarily something I want to get into as a “beginner”. But I’m grateful that you guys are here to help.

    All the best.

    #1171530
    Christian
    Moderator

    Hey there,

    Thanks for your feedback. The breadcrumbs is not something that is customizable with page editors.

  • <script> jQuery(function($){ $("#no-reply-1171145 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>