Introduction
BuddyBoss widget titles in the sidebar are left-aligned. A simple CSS snippet lets you center all <h2> widget titles site-wide.
Custom Workaround
- Go to BuddyBoss > Theme Options in your WordPress admin.
- Under Custom Codes, toggle on Enable CSS.
Append the following CSS:
aside.widget h2.widget-title {
display: flex;
justify-content: center;
}
- Save Changes.
Troubleshooting and FAQs
Q: My widget titles are still left-aligned—what did I miss?
A:
- Verify you added the snippet under Theme Options > Custom Codes.
- Clear any caches (page-cache, object-cache, CDN) and reload.
Q: I don’t see the Custom Codes section—can I add this elsewhere?
A: Yes—add the CSS to your child theme’s style.css or use a code-snippet plugin.
Q: Will this affect other headings on the page?
A: No. The rule targets only <h2> elements with the .widget-title class inside sidebar widgets.
Q: How do I revert this change?
A: Remove the CSS snippet from Custom Codes (or your child theme) and save; then purge caches.