Archived topic
Gap below navigation bar
8 replies · Started by Matthew on October 27, 2017
On the home page of my site (https://www.stonecrestleadership.com?bypass=prototype) there's a full-width gap of white space between the navigation bar and the page content. I assume this gap is being caused by the breadcrumbs container, but on only the home page I DON'T want the breadcrumbs OR their container to show at all. On all OTHER pages it/they should.
How do I accomplish what I'm after here?
Hi there,
Are you adding it using hooks?
Then you can do this in hook to include the home page:
<?php if ( ! is_front_page() ) : ?>
code here
<?php endif; ?>
Please reply on here for communication.
Thanks.
I'm doing that already, but it's not working; here's my code:
<div class="breadcrumbs">
<?php if ( function_exists( 'bcn_display' ) && ! is_front_page() ) {
bcn_display();
} ?>
</div>
Please advise.
Try this and make sure execute PHP is checked:
<?php if ( function_exists( 'bcn_display' ) && ! is_front_page() ) : ?>
<div class="breadcrumbs">
bcn_display();
</div>
<?php endif; ?>
That totally fixed it; thanks!
No problem!
Dang it! I spoke too soon... The code tweak got rid of the white space on the home page, but now on all other pages it shows the text "bcn_display();" instead of working breadcrumb functionality.
Hmm try this:
<?php if ( function_exists( 'bcn_display' ) && ! is_front_page() ) : ?>
<div class="breadcrumbs">
<?php bcn_display(); ?>
</div>
<?php endif; ?>