Any way to set Drupal theme settings per page? I have a theme which has multiple theme options in its settings page. Is there a way to assign particular theme settings to specific Drupal paths?
For Drupal 7, you can do this by taking advantage of the fact that theme settings are cached by drupal_static(). See theme_get_setting(). I think the same approach would work for Drupal 8 too, but haven't tried it.

// Implement HOOK_init.
// Here we override one of the Bootstrap theme settings.
function MY_MODULE_init() {
  // Only do this if we're actually on the relevant page.
  if ($_GET['q'] == PATH_TO_THE_PAGE) {
    // Override the Bootstrap theme setting 'Smart form descriptions (via Tooltips)'.
    // This because we want to display form input #description as text, not tooltip.
    // This will also affect any other forms on the current page, no easy solution for that.

    // Set the name of the theme we're interested in (the current theme in this case).
    $theme_name = $GLOBALS['theme_key'];    
    // Read the setting first to ensure that the drupal_static cache is populated.
    $setting = theme_get_setting('bootstrap_forms_smart_descriptions', $theme_name);
    // Get a reference to the cached settings.
    $cached_settings = &amp;drupal_static('theme_get_setting');
    // Unset the 'bootstrap_forms_smart_descriptions' setting from the cache.
    unset($cached_settings[$theme_name]['bootstrap_forms_smart_descriptions']);
  }
}


I should add, this is arguably a bit of a hack, as it depends on the internals of drupal_static() and theme_get_setting() i.e. not documented API functionality - unless you consider the code to be the documentation :)