Missing navbar on homepage

Hi,

After update to 5.2.5 the navbar is missed from homepage but navbar loads well on single pages but the blog root appears on navbar right after homepage icon which I need to hide it (BLOG phrase).

This is code of _navbar.php:

<?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-fluid max width">
        <?php x_get_view( 'global', '_brand' ); ?>
      </div>
    </div> <!-- end .x-logobar-inner -->
  </div> <!-- end .x-logobar -->

  <div class="x-navbar-wrap">
    <div class="<?php x_navbar_class(); ?>">
      <div class="x-navbar-inner">
        <div class="x-container-fluid max width">
          <?php x_get_view( 'global', '_nav', 'primary' ); ?>
          <div class="c-social"><?php x_social_global(); ?></div>
        </div>
      </div> <!-- end .x-navbar-inner -->
    </div> <!-- end .x-navbar -->
  </div> <!-- end .x-navbar-wrap -->

<?php else : ?>

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

<?php endif; ?> 

This is my blog URL : www.otoraby.com

Could you please guide me on these issues?

Thank you in advance.

Hi there,

Have you done some customization to the _navbar.php?

If so, kindly double check that the file is in the correct location which is:

/wp-content/themes/x-child/framework/legacy/cranium/headers/views/global

Hope this helps.

Yes, I had customization before.

Unfortunately moving views folder to your suggested destination did not modify it.

Also this is the customized _breadcrumbs.php:

<?php

// =============================================================================
// VIEWS/INTEGRITY/_BREADCRUMBS.PHP
// -----------------------------------------------------------------------------
// Breadcrumb output for Integrity.
// =============================================================================

?>

<?php if ( ! is_front_page() or is_front_page() ) : ?>
  <?php if ( x_get_option( 'x_breadcrumb_display' ) == 1 ) : ?>

    <div class="x-breadcrumb-wrap">
      <div class="x-container-fluid max width cf">

        <?php x_breadcrumbs(); ?>

        <?php if ( is_single() || x_is_portfolio_item() ) : ?>
          <?php x_entry_navigation(); ?>
        <?php endif; ?>

      </div>
    </div>

  <?php endif; ?>
<?php endif; ?> 

Should I modify something here!?

Hi there,

In that case, would you mind providing us with login credentials so we can take a closer look? Please provide following information:

Set it as Secure Note

  • Link to your site
  • WordPress Admin username / password
  • FTP credentials

All the best!

Sure!

Ah, confused with secure note! :grin:

Hi there,

It’s because of this line

<?php if ( ! is_front_page() or is_front_page() ) : ?>

Try setting it back to

<?php if ( ! is_front_page() ) : ?>

or to this

<?php if ( true ) : ?>

Thanks!

Hi Rad,

I did it but the breadcrumbs and their container disappeared completely from homepage! Would you please check again?
Also I would change (HOME > BLOG > BlaBla) to (HOME>BlaBla) in breadcrumbs which appears on single page/posts.

Regards

Hi there,

The <?php if ( ! is_front_page() ) : ?> portion of the code which is currently in the _breadcrumbs.php file in teh Child Theme does exactly that. It removes th ewhole nreadcrumbs deom the front page.

I changed the Child Theme to parent theme and the navigation is showing correctly on the homepage.

Please kindly consider that we can not be of a help for a customized code you have added to the Child Theme, that is outside of our support scope.

You will need to contact the developer which added the customization and ask him/her to fix the issue for you.

Thank you for your understanding.

Hi,

Thanks for your hint, it seems parent theme acts same. Of course logically hopepage does not need to have breadcrumbs and I think that is why the breadcrubms has been removed from homepage in new version.

What about the root of breadcrumbs? default settings declares that the website content there are in BLOG folder but I would not users notice it. Please kindly give me a hint to hide BLOG phrase from breadcrumbs root.

Thank you in advance.

Hi There,

We can use custom CSS to hide it. Browser developers tools can be use to inspect the specific element. See this screencast: https://screencast-o-matic.com/watch/cblX3U2mgM

.single-post .x-breadcrumbs span.delimiter:first-of-type+a {
    display: none;
}
.single-post .x-breadcrumbs span.delimiter:first-of-type {
    display: none;
}

See the following to understand the selector we have used:


https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Selectors > See combinators + sign

single-post class at the start of the CSS means it will only hide the blog link on post pages.

Hope this helps.

Very nice trick! I did not know about it. Thanks for your lessons Lely.

Glad to hear it!

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