Cannot redeclare _verify_activeatewidgets()
-
i have the extra bit of code on the functions.php file in the child theme so i can list events as “upcoming”
meaning all events after today
[ Moderator note: code fixed. Please wrap code in the backtick character or use the code button. ]
<?php add_filter( 'em_events_build_sql_conditions', 'my_em_scope_conditions',1,2); function my_em_scope_conditions($conditions, $args){ if( !empty($args['scope']) && $args['scope']=='upcoming' ){ $start_date = date('Y-m-d',strtotime("+1 days", current_time('timestamp'))); $end_date = date('Y-m-d',strtotime("+2 years", current_time('timestamp'))); $conditions['scope'] = " (event_start_date BETWEEN CAST('$start_date' AS DATE) AND CAST('$end_date' AS DATE)) OR (event_end_date BETWEEN CAST('$end_date' AS DATE) AND CAST('$start_date' AS DATE))"; } return $conditions; } ?>anyways its been working great, but every time i test other themes, then return to my current theme, this functions.php file in the child theme keeps getting rejected, and my whole website crashes with the following error…
Fatal error: Cannot redeclare _verify_activeatewidgets() (previously declared in /home/676687666/public_html/wp-content/themes/CarZilla-Child/functions.php:19) in /home/676687666/public_html/wp-content/themes/CarZilla/functions.php on line 92all i do is delete my functions.php, and website works again, but i want to be able to use my UPCOMING events scope
any ideas whats going wrong? thanks for any help 🙁
The topic ‘Cannot redeclare _verify_activeatewidgets()’ is closed to new replies.