Customising Header - advertising

Hi,

I try to customise my header to insert an add. I saw the ticket https://theme.co/apex/forum/t/help-with-navbar/27913 but the site “broke” everytime i try to add some code (I try to put the same code as show in the ticket) just the top header (social media) appear ! every thing below disappear !

When i delete the file in child theme !

Hi Hugues,

Let’s start from the scratch here to help you out on the matter. If you want to add any additional information after the Logo on the website I suggest that you install the Child Theme and copy over the file below:

x/framework/legacy/cranium/headers/views/global/_navbar.php

to:

x-child/framework/legacy/cranium/headers/views/global/_navbar.php

You will need to create the necessary folders in your Child Theme

Then add the code below to the newly copied file:

<?php

// =============================================================================
// VIEWS/GLOBAL/_NAVBAR.PHP
// -----------------------------------------------------------------------------
// Outputs the navbar.
// =============================================================================

$navbar_position = x_get_navbar_positioning();
$logo_nav_layout = x_get_logo_navigation_layout();
$is_one_page_nav = x_is_one_page_navigation();

?>

<?php if ( ( $navbar_position == 'static-top' || $navbar_position == 'fixed-top' || $is_one_page_nav ) && $logo_nav_layout == 'stacked' ) : ?>

  <div class="x-logobar">
    <div class="x-logobar-inner">
      <div class="x-container max width">
        <?php x_get_view( 'global', '_brand' ); ?>
        <!-- ADD YOUR HTML -->
      </div>
    </div>
  </div>

  <div class="x-navbar-wrap">
    <div class="<?php x_navbar_class(); ?>">
      <div class="x-navbar-inner">
        <div class="x-container max width">
          <?php x_get_view( 'global', '_nav', 'primary' ); ?>
        </div>
      </div>
    </div>
  </div>

<?php else : ?>

  <div class="x-navbar-wrap">
    <div class="<?php x_navbar_class(); ?>">
      <div class="x-navbar-inner">
        <div class="x-container max width">
          <?php x_get_view( 'global', '_brand' ); ?>
          <?php x_get_view( 'global', '_nav', 'primary' ); ?>
        </div>
      </div>
    </div>
  </div>

<?php endif; ?>

Replace <!-- ADD YOUR HTML --> with your HTML code that you want to add in the header.

You may also need to add some additional CSS code to X > Theme Options > CSS to fine tune your code

This is considered as a custom development and it is outside of our support scope.

Thank you.

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