Archived topic
sticky left side bar combined with breadcrumbs?
26 replies · Started by Walter Schwarz on August 31, 2020
Hi David,
in an other thread the following css was proposed to create a sticky side bar left side:
.site-content {
display: flex;
}
.site-content > div {
left: unset !important;
}
#left-sidebar {
order: -1;
}
#left-sidebar .inside-left-sidebar {
position: -webkit-sticky;
position: sticky;
top: 80px;
}
Works fine - but not in combination with my breadcrumbs code. Could you please check and send a modified css configuration?
URL should work and not create a "502 bad gateway". I tested it on several notebooks and smartphones.
Thank you,
Walter
Hi there,
I just view and the but not seeing any issues?
https://www.screencast.com/t/2rTod8aTqnK
Am I missing something?
Hi Leo,
sorry - I forgot to save the css with the sticky code. Now it is stored as intended.
Cheers.
Glad to hear :)
Hi,
I guess it's a misunderstanding. Saving the css code did not solve the problem, but allows to show you the problem I have (breadcrumbs do not work as they should using the sticky code).
Applying the sticky code squeezes the breadcrumbs between left widget column and the middle content column.
The breadcrumbs should again start above the left widget column and disappear by scrolling down or they should also be sticky ...
Cheers.
How are you adding the breadcrumbs currently?
Using a hook?
I use YOAST Premium and modifications I have made long time ago in the page.php (?):
<?php
/**
* Template Name: drwjs | breadcrumbs » copyright
* Author: drwjs
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
get_header(); ?>
<!-- drwjs | Breadcrumbs -->
<?php if ( function_exists('yoast_breadcrumb') ) {
yoast_breadcrumb('<p id="breadcrumbs">','</p>'); /* Original: id */
} ?>
<!-- drwjs | Breadcrumbs ENDE -->
<main id="main" <?php generate_main_class(); ?>>
<?php
/**
* generate_before_main_content hook.
*
* @since 0.1
*/
do_action( 'generate_before_main_content' );
.....
Cheers.
No need to modify the template to insert breadcrumbs.
Can you try a hook solution as recommended here?
https://docs.generatepress.com/article/adding-breadcrumbs/
Hi,
I tried a lot, but did not succeed. I always have the effect, that the breadcrumbs "create" a new column between the left widget and the middle main content.
I will leave the wrong coding for a while to demonstrate:
I used:
- [ w p s e o _ b r e a d c r u m b ] ----> originally without the blanks inserted.
- generate_before_entry_title
- shortcodes activated
- PHP kann nicht ausgeführt werden, da DISALLOW_FILE_EDIT definiert ist.
- page | all pages
What is wrong or missing?
Cheers.
Walter
Are you adding this
<div class="grid-container grid-parent"></div>
If so can you try removing that?
If you mean in the child-css: no.
Where else could it be?
Trying to use the php-code failed; I inserted as describes the shortcode [wpseo_breadcrumb] in the new element edit area. [ w p s e o _ b r e a d c r u m b ] ----> originally without the blanks inserted.
Could be that I totally are disoriented ...
Maybe you could present screenshots of what exactly must be written and selected where.
Cheers
Can you try the after_header hook?
I tried - but does not work.
I already tried shortcode, php-insertion, function.php with and without breadcrumbs-function and different hook-insertions ...
The best would be if the plugin "Sticky Menu (or Anything!) on Scroll" could manage at least 2 widgets as announced years ago. Is there any other plugin to be recommended?
Thank you for your engagement.
Cheers.
That plugin should still be good :)
I know - but it can handle just one widget. I need to have left and right side widgets to be sticky at the same time ...