skip to Main Content

Improving the body classes in X-Cart 4

Improving The Body Classes In X-Cart 4

To get better granularity with styling in CSS on X-Cart 4 I have always felt that the body tag could do with more class declarations a bit like WordPress and Drupal.

So this could be used for example for styling just category pages or specific products and categories.

To do this in X-Cart 4 you need to download and edit the include/func/func.core.php file.

Find the lines

and change this to

You will then see the following classes appear in the source code:

Homepage

Category Page
Product Page
Static Page
Back To Top