skip to Main Content

I am working on an old WordPress site. Although the site is updated to the latest version of WordPress (5.9.1) it was apparently built on the twentyfouteeen theme.

Just lately, I am getting a fatal error on the Posts Page:

Fatal error: Uncaught Error: Call to undefined function twentyfourteen_categorized_blog()

The function is located in the template-tags.php file and it exists so the theme should be able to access it. In fact, I’m getting the fatal error on any page that calls a twentyfourteen function.

I copied the functions from template-tags.php to content.php which did in fact load posts but then gave me a different error Cannot redeclare twentyfourteen_categorized_blog()

I’ve never had to troubleshoot this kind of error and since the theme is old, I’m not sure how to go about it.

2

Answers


  1. Chosen as BEST ANSWER

    I was able to resolve this by including template_tags.php in functions.php


  2. "Cannot redeclare twentyfourteen_categorized_blog()" means that your file is trying to declare the same function multiple times. Either the function is defined in two separate files or in two places in the same file.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search