Archived topic
Putting the table of contents on the right sidebar for each content
10 replies · Started by Oguz on March 14, 2023
Hello, as you can see in the site link I sent you privately. Breadcrumbs appear on the right in desktop view, how do I do this?
Hi there,
Do you mean the table of content in the sidebar?
Are you using a plugin for the table of content? Does the plugin offer a widget, block, or shortcode?
Let me know!
yes . offers. I am using lucky content plus. available as a component.
If the plugin offers a widget, you can add the widget to the sidebar at appearance > widgets > sidebar.
If it offers a block or shortcode, you can use a block element - hook to insert it into the sidebar.
Choose theafter_right_sidebar_content hook or before_right_sidebar_content hook based on your design.
Set the location to posts > all posts.
Added . but it doesn't come with it when you scroll down the screen. In addition, it looks white. I leave the link. review.
Hi there,
GO to Customizer > Additional CSS and Delete this:
.sidebar .widget:first-child, .sidebar .widget:first-child .widget-title {
background-color: #83b0de;
color: #fff;
}
then add this CSS:
@media(min-width: 768px) {
.inside-right-sidebar {
position: sticky;
top: 60px;
}
}
#lpwtoc_widget-2 {
padding: 0 !important;
}
I added what you mentioned. But this time it looks transparent and does not move. Check.
I'm still seeing the CSS that David asked you to delete on your site, make sure all cache is cleared.
https://www.screencast.com/t/WAXqPTJU1
And I've modified David's CSS here, give it another try:
https://generatepress.com/forums/topic/putting-the-table-of-contents-on-the-right-sidebar-for-each-content/#post-2570126
Thank you
You are welcome :)
A good solution would be a combination of the Kadence plugin https://wordpress.org/plugins/kadence-blocks/ and the Fixed Widget for WordPress https://wpadvancedads.com/fixed-widget-wordpress/.
Implementation guide: https://www.kadencewp.com/kadence-blocks/feature-requests/sidebar-sticky-table-of-contents/