Zerif Pro php 8 compatibility

I’m still using a good ‘ol Zerif Pro theme from back in the day. Even though I purchased a license back then (2016), I found out later that Theme Isle don’t allow updates anymore after the first year unless you purchase a new license. As I never update the content and am not interested in new features I left the site as it has been, since it still ranks 1 on the search terms I’m interested in.

Today I was forced to update the php version to 8+ and found out that this breaks the site completely due to some deprecated php in the code. I’ve fixed it by updating the code that caused the error and thought I’d share in case someone else runs into the same issue and wants to fix this. First, you should enable debugging in order to see if you get the same error:

Via FTP, open config.php from your root directory and enable debugging:

`// Enable WP_DEBUG mode`

`define( ‘WP_DEBUG’, true );`

`// Enable Debug logging to the /wp-content/debug.log file`

`define( ‘WP_DEBUG_LOG’, true );`

Save the file and continue.

Next, change your PHP version on the webhost admin panel to PHP 8(+). I’ve set it to 8.2.

Go to your website and check if you get any error messages. My website showed the following error message:

Fatal error: Unparenthesized \`a ? b : c ? d : e\` is not supported. Use either \`(a ? b : c) ? d : e\` or \`a ? b : (c ? d : e)\` in /mnt/web/c8/32/328038/htdocs/website/wp-content/themes/zerif-pro/sections/about\_us.php on line 107

Via FTP, go to ../wp-content/themes/zerif-pro/sections/about\_us.php and open in a text editor. Change lines 105 – 111 from:

`$there_is_skills = ”;`


`!empty($zerif_aboutus_feature1_nr) || !empty($zerif_aboutus_feature1_title) || !empty($zerif_aboutus_feature1_text) ? $there_is_skills=’yes’ :`

`!empty($zerif_aboutus_feature2_nr) || !empty($zerif_aboutus_feature2_title) || !empty($zerif_aboutus_feature2_text) ? $there_is_skills=’yes’ :`

`!empty($zerif_aboutus_feature3_nr) || !empty($zerif_aboutus_feature3_title) || !empty($zerif_aboutus_feature3_text) ? $there_is_skills=’yes’ :`

`!empty($zerif_aboutus_feature4_nr) || !empty($zerif_aboutus_feature4_title) || !empty($zerif_aboutus_feature4_text) ? $there_is_skills=’yes’ :`



`$there_is_skills = (`

`!empty($zerif_aboutus_feature1_nr) || !empty($zerif_aboutus_feature1_title) || !empty($zerif_aboutus_feature1_text) ? $there_is_skills=’yes’ :`

`(!empty($zerif_aboutus_feature2_nr) || !empty($zerif_aboutus_feature2_title) || !empty($zerif_aboutus_feature2_text) ? $there_is_skills=’yes’ :`

`(!empty($zerif_aboutus_feature3_nr) || !empty($zerif_aboutus_feature3_title) || !empty($zerif_aboutus_feature3_text) ? $there_is_skills=’yes’ :`

`(!empty($zerif_aboutus_feature4_nr) || !empty($zerif_aboutus_feature4_title) || !empty($zerif_aboutus_feature4_text) ? $there_is_skills=’yes’ :`




The updated code has some extra required parentheses. Save the file and the error should be gone and the website should function normally again. Don’t forget to set the debugging in config.php back to false.


This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer