-
Valerrr
Hello, I would like to create a sidebar for blog posts. However, I have a few questions.
1. Currently, I have the Content Width set to 800 px, and I want to add a sidebar to it. How should I ideally set this up in GeneratePress, and how many px should I choose?
2. Can I enable the sidebar only for computers?
3. I want to place SimpleTOC in the sidebar container. Can I somehow set it up so that the table of contents is displayed in the sidebar on a computer and directly in the article on a mobile phone and tablet?
-
Alvind
Hi there,
1. First, enable the Sidebar under Customize > Layout > Sidebars. For Single Post Sidebar Layout, set it to Content / Sidebar. Then create a new Sidebar Element, design your sidebar there, and set the Display Rules to Post > All Posts.
2. You can hide the sidebar on mobile with this CSS:
@media (max-width: 768px) { #right-sidebar { display: none; } }3. You’ll need a separate TOC for each breakpoint. For the TOC on tablet and mobile, set it to display only on those breakpoints. You can do this either with custom CSS or, if you have GB Pro, by using the Block Conditions feature. Once you’ve set up the TOC, we can help implement either method.
- You must be logged in to reply to this topic.