New — Sohay now answers WooCommerce product, policy & cart questions. See how →

Restyling the Knowledge Base pages

The pages inherit your theme's fonts and colours by design. How to adjust them, and how to start from scratch.

The Knowledge Base pages are deliberately plain. They ship layout, borders, and spacing — and no fonts, no colours, no reset of their own.

That is why they do not look bolted on: they inherit your theme’s typography, link styling, and palette. A theme that goes dark takes the Knowledge Base with it, because the borders and muted text are mixed from the current text colour rather than hard-coded.

Adjusting rather than replacing

Every class is namespaced under .sohaychat-kb. To adjust the look, target those classes from your theme’s stylesheet — no plugin files involved, and nothing to redo when Sohay updates.

The stylesheet is loaded only on the three Knowledge Base surfaces, so anything you write against those classes stays scoped to them.

Starting from scratch

To drop Sohay’s styling entirely and write your own, dequeue it:

add_action( 'wp_enqueue_scripts', function () {
    wp_dequeue_style( 'sohaychat-kb-archive' );
}, 100 );

The late priority matters — the style is enqueued during the normal pass, so dequeuing at the default priority runs too early to have any effect.

With it gone you have unstyled but fully structured markup, and the class names above to hang your own CSS on.

What styling cannot change

CSS reaches the layout, not the structure. If you want a different number of articles per section, different markup, or a different page shape, that is a template change rather than a stylesheet one — see Overriding a Knowledge Base template.

One thing you can change without templates:

add_filter( 'sohaychat_kb_articles_per_section', function () {
    return 10;
} );

That is how many articles each category section lists on the index before linking to the category for the rest. The counts on the cards are unaffected — they come from the real category totals, not from the listed articles.

A note on the chat widget

None of this applies to the chat widget itself. The widget renders inside an isolated container specifically so your theme cannot restyle it and it cannot restyle your theme. The Knowledge Base pages are ordinary theme territory; the widget is not.

Where to go next

Overriding a Knowledge Base template for changes CSS cannot reach.

Mithun B.
Mithun B.

More articles by Mithun B..

View all posts

Give your website an assistant that answers from your content

Grounded answers, a team inbox, and store-aware tools — free on WordPress.org.

Add Sohay — Free

Free plugin · You bring your OpenAI key · Works with any theme