Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1264929
    unluckynelson
    Participant

    Hi there,

    I want to create bread-crums on my NAV-bar, but also want them to stick when I scroll down. I want them to be alligned to the left of the container. I enabled breadcrums on the customiser, but dont see them anywhere.. sorry, i’m still new at wordpress.
    Attached is an image of what my Nav bar looks like, and how I want it to look with the bread-crums.

    Thank you kindly,

    URL: http://flashingcentre.co.za/wp/wp-login.php?redirect_to=http%3A%2F%2Fflashingcentre.co.za%2Fwp%2Fwp-admin%2F&reauth=1

    **credentials removed by staff**

    #1264959
    Rupok
    Member

    Hi there,

    You should not share your login credentials in a public post. You can share them in a separate private reply.

    However do you want to make the breadcrumbs fixed on top? In that case you should use Fixed Navbar from Customize > Header. Update us after doing so, we’ll provide some code to make the breadcrumbs fixed.

    Thanks!

    #1264966
    unluckynelson
    Participant
    This reply has been marked as private.
    #1264967
    unluckynelson
    Participant
    This reply has been marked as private.
    #1264971
    unluckynelson
    Participant
    This reply has been marked as private.
    #1264973
    Christopher
    Moderator

    Hi there,

    Because this requires a template change, I’d advise that you setup a child theme. This allows you to make code changes that won’t be overwritten when an X update is released. After your child theme is setup, please review how we recommend making template changes in Customization Best Practices.

    Copy _landmark-header.php from framework/views/renew and put it in the same path inside child theme, replace existing code with following :

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

    If you want to enable breadcrumbs on home page as well, update line 104 which is <?php if ( ! is_front_page() && ! x_is_portfolio() ) : ?> to <?php if ( ! x_is_portfolio() ) : ?>

    Hope it helps.

    #1265283
    unluckynelson
    Participant

    Please understand that i’m a newbee. So this is very confusing and frustrating..
    I’ve setup the X Child theme. And it’s activated. I’ve located the _landmark.php file under:
    E:\websites\flashingcentre\www\wp-content\themes\x\framework\views\renew

    But I dont know where the ChildTheme directory is.

    Please advise.

    #1265314
    Paul R
    Moderator

    Hi,

    The child theme directory is in E:\websites\flashingcentre\www\wp-content\themes\x-child

    You can copy the file and paste it in E:\websites\flashingcentre\www\wp-content\themes\x-child\framework\views\renew

    Hope that helps.

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