Help:$smwgQSubcategoryDepth

is a configuration parameter that sets the maximum level of subcategory inclusions (steps within category hierarchy) to be considered by queries. The configuration parameter was introduced in.

Default setting
This means that subcategory inferencing is thus restricted to 10 levels.

Changing the default setting
To modify the setting to this configuration parameter, add one of the following lines to your "LocalSettings.php" file after the  call:

This means that subcategory inferencing is disabled.
 * Disable category inferencing during querying

This means that subcategory inferencing is widened to 15 levels.
 * Change the level of category inferencing during querying