Error in taxonomy.php

Asked

Viewed 79 times

1

I have the following obstacle:

Fatal error: Cannot redeclare add_term_meta() (Previously declared in /home/xxx/public_html/wp-includes/taxonomy.php:1757) in /home/xxx/public_html/wp-content/themes/theleader/framework/inc/taxonomy-Metadata.php on line 103

And I can’t find a solution, suggestions?

1 answer

1

The function add_term_meta() is being declared twice.

One in the archive: /home/xxx/public_html/wp-includes/taxonomy.php

And another in the file: /home/xxx/public_html/wp-content/themes/theleader/framework/inc/taxonomy-metadata.php

A function can only be declared once.

Tip: you can create a separate file for this function, and in the two previous files you can perform a require_once 'pasta/arquivo_funcao.php';

  • I’m half layman, I don’t know how to accomplish that require.

  • You create a PHP file, in it you put the function add_term_meta() and delete it from the other files, in place of it, in the other files, you write require_once 'name_folder/file_com_a_funcao_add_term_meta.php';

Browser other questions tagged

You are not signed in. Login or sign up in order to post.