Support » Fixing WordPress » category template issue

  • Hello,

    I had Word Press installed and it seemed to be working okay until I added a new theme today. I use this theme on a different site without any problems, but on an older version of WordPress. Anyway, I am hoping that someone will be able to help be remedy this issue. Below is the warning that I am getting, and you can see it yourself in action!

    Warning: array_key_exists(): The first argument should be either a string or an integer in /home/content/K/e/n/KenAnderson/html/epic_blog/wp-includes/category-template.php on line 176

Viewing 5 replies - 1 through 5 (of 5 total)
  • If you take a look at the template tags, you’ll see that several of the category tags are now marked as “deprecated.” Look in your theme for any of those tags and remove them (or replace with a non-deprecated tag).

    Or contact the theme author to see if there is a 2.3 compatible version of the theme.

    Thanks for your reply. The link for template tags does not work for some reason. Where do I look for these “deprecated tags,” and how do I go about removing them?

    There’s the link again.

    They might be all over the theme. Most likely in index.php and single.php. You may want to start by seeing whether the theme author has updated the theme already, if you haven’t already checked.

    I did check, but was unsuccessful. His site hasn’t been updated in a year. Maybe he has it posted someplace else.

    If there is no upgrade for your theme available and are feeling brave, you can edit your category-template.php file to check for the categories explicitly.

    replace this line (line 176):
    if(array_key_exists($category, $categories))

    with this:
    if(!(false === $category) && array_key_exists($category, $categories))

    I have been having this error and have put a quick post about it here.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘category template issue’ is closed to new replies.