0
votes

I have a function on parent theme called function ce_seller_bar( $seller )

I want to overwrite it in child theme without deleting it from parent

When I delete it in parent theme it works, when I don't delete it the browser output is:

Fatal error: Cannot redeclare ce_seller_bar()
(previously declared in
C:\wamp\www\CampusAdsList2\wp-content\themes\classifiedengine-child \includes\template.php:12)

That means that child function had been loaded before parent one so I want to write the function in child theme so after update I dont lose it

ty

1
This is exactly what I would expect to happen. You can't have two functions with the same name. - henrywright

1 Answers

0
votes

thanks for replay I took a nap when I woke up,I figured out an easy solution my solution is to overwirte file /template/ad_detail.php that calls this function and this file doesnt contain functions like template.php so I copy and past it in child theme directory
as I created my new function with defferent name in fuctions.php in child theme as well as I call it new file in /template/ad_detail.php inside child theme and it works fine for me