Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #900792
    jonelsworth
    Participant

    Hello,

    Please can you tell me how to centralise the header image and add a search bar below the header (to the right) on my website http://thepolicememorialtrust.org – please see this image for details: http://prntscr.com/ax6bj1

    Many thanks in advance

    #900832
    jonelsworth
    Participant

    Hi,

    Just a quick update – I’ve managed to centralise the header image but I still need to know if it’s possible to put a search bar underneath the header to the right of the page.

    Kind regards

    #901836
    Christopher
    Moderator

    Hi there,

    Thanks for writing in!

    No, you can’t move search icon from navbar to landmark header area.

    Please add search element to content area using cornerstone.

    Hope it helps.

    #902388
    jonelsworth
    Participant

    Hi Christopher,

    Is it not possible even with css?

    Many thanks in advance.

    #902400
    jonelsworth
    Participant

    So I’ve put a search bar on the homepage – can this not be moved up to the top right underneath the main image?

    See here http://thepolicememorialtrust.org

    Thanks again.

    #903262
    Rad
    Moderator

    Hi there,

    Beside the text “Homepage”? Sure, please add this code to Admin > Appearance > Customizer > Custom > Javascript.

    jQuery('.home .x-search-shortcode').css({float:'right'}).appendTo('.x-landmark');

    Then add this CSS too to Custom CSS

    .home .h-landmark.entry-title {
    float: left;
    }

    Hope this helps.

    #903895
    jonelsworth
    Participant

    That’s fantastic support! Thank you very much Rad.

    #903907
    jonelsworth
    Participant

    Sorry – I have a couple more questions…

    Is it possible to reduce the height of the space between the header image and the line so it’s the same as other pages on the site?

    Please see these images for example (look at the red arrow):
    http://prntscr.com/axuwfa
    http://prntscr.com/axuwur

    Also, can the search bar be visible in that location on every page of the site?

    Many thanks in advance.

    #904656
    Joao
    Moderator

    Hi there

    Try adding this code to your Customizer / CSS

    .x-header-landmark {
    
    padding-bottom: 1%;
    
    }
    
    .home .x-header-landmark {
    
    padding-top: 2.5%;
    padding-bottom: 0% !important;
    
    }

    Hope that helps!

    Thanks

    Joao

    #905423
    jonelsworth
    Participant

    Yes that worked! Thanks again.

    I just need to know if it’s possible to have the Search bar in that location on every page of my site?

    Kind regards.

    #906442
    Friech
    Moderator

    Hi There,

    If that is the case you need to place the search shortcode directly on the landmark-header template. To do that, On your x-child theme navigate to this \x-child\framework\views\renew\ directory, create a file there named _landmark-header.php and paste the entire code below.

    <?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' );
    $var_search         = do_shortcode( '[x_search]' );
    
    ?>
    
    <?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 left"><span><?php the_title(); ?></span></h1>
              <div class="mysearch right"><?php echo $var_search ?></div>
              <?php elseif ( is_home() || is_single() ) : ?>
                <?php if ( x_is_portfolio_item() ) : ?>
    
                  <h1 class="h-landmark left"><span><?php echo x_get_parent_portfolio_title(); ?></span></h1>
    
                <?php elseif ( is_singular( 'post' ) ) : ?>
           
                    <h1 class="h-landmark left">
                      <span>
                        <?php the_title(); ?>
                      </span>
                    </h1>
                  <div class="mysearch right"><?php echo $var_search ?></div>
                <?php else : ?>
    
                  <h1 class="h-landmark left"><span><?php echo x_get_option( 'x_renew_blog_title' ); ?></span></h1>
                       <div class="mysearch right"><?php echo $var_search ?></div>
                <?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 it helps, Cheers!

    #906854
    jonelsworth
    Participant

    Yes it does help – and once again excellent support. Thank you!

    Is it possible to reduce the move the search bar so it’s in the same place on every page (including the homepage) – just to the left of the breadcrumbs? Also, reduce the line height on all pages to match the homepage.

    Please see the following images for examples:

    http://prntscr.com/aynn4y
    http://prntscr.com/aynkxp

    Kind regards.

    #907529
    Rue Nel
    Moderator

    Hello There,

    To move the search bar and make sure that the height of the line is the same throughout the entire site, please add the following css code in the customizer, Appearance > Customize > Custom > CSS

    .mysearch.right {
        position: absolute;
        left: 50%;
        margin-left: -80px;
    }
    
    .x-landmark-breadcrumbs-wrap {
        position: relative;
        min-height: 100px;
    }

    Hope this helps.

    #910399
    jonelsworth
    Participant

    Yes that’s perfect thank you!

    #910576
    Lely
    Moderator

    You’re welcome!

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