Support » Plugin: Widgets on Pages » Undefined index: enable_css

  • Resolved mannweb

    (@mannweb)


    Turned on WP debugging and found this error being spit out:

    Notice: Undefined index: enable_css in widgets-on-pages/widgets_on_pages.php on line 289

    Changed the code from:

    $enable_css = $options["enable_css"];
    if ($enable_css) {
      add_action('wp_head', 'add_wop_css_to_head');
    }

    To this:

    if ( in_array ( "enable_css", $options ) ) {
      add_action('wp_head', 'add_wop_css_to_head');
    }

    Problem resolved.

    • This topic was modified 2 years, 11 months ago by  mannweb.
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Undefined index: enable_css’ is closed to new replies.