Changing the footer info in a child theme


I have a child theme and I want to change/edit the footer info. when I insert the function

 * function to show the footer info, copyright information
function sparkling_footer_info() {
global $sparkling_footer_info;
  printf( __( 'Theme by %1$s Powered by %2$s', 'sparkling' ) , '<a href="" target="_blank">Colorlib</a>', '<a href="" target="_blank">WordPress</a>');

which I copied from extra.php file, i get the following error

Fatal error: Cannot redeclare sparkling_footer_info() (previously declared in /home/vapor/public_html/wp-content/themes/sparkling-child-3/functions.php:8) in /home/vapor/public_html/wp-content/themes/sparkling/inc/extras.php on line 211

What Am I doing wrong?

Hi @sabbah,

I hope you are well today and thank you for your question.

You are redeclaring the function sparkling_footer_info which you are doing wrong.

So to resolve the issue please change the above function name to custom_sparkling_footer_info in the functions.php file of your child theme and copy the footer.php file from Sparkling theme in to your child theme root directory and then rename the same function in it to custom_sparkling_footer_info in that copied footer.php file.

Best Regards,