How to Fix My FlexiTheme After Updating to WordPress 5.1

If you are using a WordPress theme from FlexiTheme and have upgraded to WordPress 5. 1 you might have broken your blog. I know that, because that was exactly what happened to me.

Fix issue after upgrading to WordPress 5.1

Don’t worry, there is a way to fix this issue without rolling back to a previous version of WordPress. The support team from FlexiThemes has created a small script that can fix the issue very fast and easy.

The Issue Explained

After upgrading to WordPress 5.1 you will end up with an error on your blog that looks something like this:

Fatal error: Call to a member function hook() on null in wp-content/themes/ [name of theme] /header.php on line 7

This reason for this is a change introducing of a new variable in WordPress 5.1 that is conflicting with all themes by FlexiThemes. That is why it has not been an issue in previous updates of WordPress. In fact, I think it is the first time I have had any issues with my theme from FlexiTheme. However, their support team was fast to come up with a workaround to sort it all out.

The Solution

This is the solution from the official support team that worked out great for me:

  1. Download attached file by right clicking this link and “Save as”
  2. Rename the file to something someone else won’t be able to guess, and change it to a .php file (i.e. remove the .txt from the name and add .php)
  3. Upload it to the root directory of your WordPress theme folder, e.g. wp-content/themes/[name of theme]
  4. Go to your example.org/wp-content/themes/[name of theme]/[name of your file from step 2.php]
  5. You should see a success message. Check your site and everything should work.
  6. Delete the file from the server. Important..!
  7. Edit your style.css and update the version number with 1.2
  8. That should to the trick!

Questions about this solution

For more information you can find detailed information about the issue at FlexiThemes website. The support team are also available if you have questions or need more help to fix the problem upgrading to WordPress 5.1. You are also welcome to drop me comment below and I will do my best to answer your questions.

Thomas
About the author:
I am an IT Professional that has this blog as a hobby project in my spare time. I have been in the IT business since 1996 and want to share some of the thing I have picked up over the years with people who visit this blog...

>>Subscribe to my Newsletter<<

One Response to How to Fix My FlexiTheme After Updating to WordPress 5.1

  1. Mike Marko says:

    Thanks for sharing, its helpful

Leave a Reply

Your email address will not be published. Required fields are marked *