-
Author
-
May 7, 2014 at 09:34 #17061AdamParticipant
I have a custom version of this function in my functions.php and it’s wrapped with an !function_exists. So is the initial declaration in custom_buddypress/
But there is a conflict:
PHP Fatal error: Cannot redeclare kleo_bp_search_form_horizontal() (previously declared in […]/wp-content/themes/sweetdate-child/functions.php:528) in […]/wp-content/themes/sweetdate/custom_buddypress/kleo-bp-search.php on line 235Looks like my functions.php is actually being loaded first.
How can I override the /sweetdate/custom-buddypress/ theme version of this function with my own in /sweetdate-child/functions.php and avoid this conflict?
May 7, 2014 at 09:48 #17065AbeKeymasterHi, add just the function without if function exist condition
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution---
@ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.July 10, 2014 at 20:56 #22326AdamParticipantHey @abe, I get the redeclaration error with and without the ‘if exists’ wrapper.
I was already re-declaring kleo_members_filter in order to add a search form expand/hide button, and it was executing kleo_bp_search_form_horizontal($mode), so the only way I was able to get this to work was to define my own mm_bp_search_form_horizontal() and call that instead..
July 11, 2014 at 17:35 #22412AbeKeymaster@adam if you add your custom kleo_bp_search_form_horizontal function in the child theme you should not get this error since I see that where the function is defined it is wrapped in ! function_exists
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution---
@ SeventhQueen we do our best to have super happy customers. Thanks for being our customer. -
AuthorPosts
You must be logged in to reply to this topic.