"An error of type E_ERROR" caused by PHP code in posts, pages, etc

We have tracked an issue to a single line of code, that when removed, stops generating the errors.

<?php x_main_content_class(); ?>

This is located in several files: wp-page, wp-sidebar, and wp-post

When we remove the line, the errors stop - but whenever we update the theme, the code is placed in the files again, and it’s begins to generate errors again.

Error messages:

“Error message: Uncaught Error: Call to undefined function x_link_pages() in …”
“Uncaught Error: Call to undefined function x_main_content_class() in …”

Hello @shadowtrack,

Thanks for writing in!

Please be advised that x_link_pages() and x_main_content_class are a much need php function for the X theme to work. It may have some errors because your theme is outdated. Could you please update to the latest versions?
Our latest versions are:
- X theme 7.1.2
- Cornerstone 4.1.2
- WordPress core 5.3.2

This latest release contains fixes for several issues so be sure to check out the changelog (http://theme.co/changelog/).

After doing the updates, always remember to clear all caches (if you are using Autoptimize, WP Rocket, WP SuperCache or W3 Total Cache) when updating so that the code from the latest release is always in use. This will help you to avoid any potential errors.

If nothing is helping, provide us access to your site so that we can check your settings. Please create a secure note with the following info:
– Link to your site
– WordPress Admin username / password

To know how to create a secure note, please check this out: https://theme.co/apex/forum/t/how-to-get-support/288

Please let us know how it goes.

Current site state is as follows:
WordPress Environment:
Version: 5.3.2
Theme:
Name: X
Version: 7.1.2
Folder: //nas/content/live/shadowtrack/wp-content/themes/x/
Cornerstone Status: Enabled
Cornerstone Version: 4.1.2

I will provide access details in a secure note.

Hello @shadowtrack,

I have logged in to your site. I am not seeing any PHP error in your dashboard. I have checked the version and you are up to date. Do you still experiencing the issue? Please clarify it further.

Thanks.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.