Sidebar Section Rearrangement

AI-generated summary

The discussion Sidebar Section Rearrangement began with Aditya_Shevle asking if it’s possible to rearrange categories in the sidebar. awesomerobot provided a CSS solution, which Aditya_Shevle found helpful but needed modification to place categories after the first section. awesomerobot revised the CSS, and Aditya_Shevle confirmed it worked. Alternatively, Lilly suggested using the Navigation Menu Display Control theme component. However, willie pointed out that the CSS solution only works for desktop and questioned its functionality on mobile.

Hi,

I was wondering if it’s possible to rearrange the categories listing above the custom section in the sidebar. If so, could someone assist me with this?

Thank you in advance!

2 Likes

There’s not a setting for this, but it can be done by adding CSS to admin/customize/themes

.sidebar-wrapper { 
  .sidebar-custom-sections {
    display: contents;
  } 
  [data-section-name="community"] {
    order: -3;
  }
  [data-section-name="categories"] {
    order: -2;
  }
  [data-section-name="custom-section-title-here"] {
    order: -1;
  }
}
4 Likes

You can change the order of any navigation sidebar menu sections with my Navigation Menu Display Control theme component.

3 Likes

Hi @awesomerobot Thank you for your reply. Its a great css the one you have provided, however I want categories should come after First section which includes Topics, My Posts, Review, Admin & More..
I hope you understand.

4 Likes

Ah, sorry I misunderstood… I revised my answer to reflect this above.

2 Likes

@awesomerobot Excellent CSS. It’s perfectly working. Thank you so much.. :heart_eyes:

3 Likes

This is only work for desktop what about mobile?

2 Likes