• Hi,

    I’ve inherited a site that I had to move. When I moved it, I made sure the php version, 7.3 matched. But, on the new dev instances I’m using to test before live I am getting an error like this:

    Warning: Use of undefined constant menucat – assumed ‘menucat’ (this will throw an Error in a future version of PHP) in /srv/users/biddle-street/apps/biddle-street/public/corporate/wp-content/themes/biddle/home-template.php on line 1189. Here is the code on like 1189:

    $termcount = wp_count_terms(menucat, array(‘taxonomy’=>’menucat’, ‘hide_empty’=>0,’parent’ => 0) );

    Here is a screenshot:

    2021-03-01_21-23-04

    Anyone have an idea on how to fix this?

    Thanks!

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Hi,

    That’s interesting did you have any plugins which includes functionality of “menucat” if yes this error coming form there.

    Secondly I think you passed wrong argument to the function wp_count_terms() you can check it here.

    I hope this will be helpful for you.
    Thank You

Viewing 1 replies (of 1 total)
  • The topic ‘Undefined Constant Warning Issue’ is closed to new replies.