Wordpress - Advanced Category Excluder - Undefined Variable Error -
trying use advanced category excluder plugin , works great except on 404 page i'm getting of these "undefined variable" errors on line 446
try here: http://bolivares.com/test
line 446 reads return $filter;
in full context:
function ace_get_section() { global $wp_query, $ace_targets; if (is_array($ace_targets)) { foreach ($ace_targets $key=>$val) { if (!empty($wp_query->$key) && $wp_query->$key == 1) $filter = $key; } } return $filter; }
plugin page http://wordpress.org/extend/plugins/advanced-category-excluder/
anyone know how can resolved?
that $filter
variable defined when conditions met when conditions not met variable undefined notice says.
so try add $filter="";
in beginning of function this:
function ace_get_section() { global $wp_query, $ace_targets; $filter=""; if (is_array($ace_targets)) { foreach ($ace_targets $key=>$val) { if (!empty($wp_query->$key) && $wp_query->$key == 1) $filter = $key; } } return $filter; }
Comments
Post a Comment