Hello after updating PHP 8.1 we are fetching issues like not showing more custom taxonomy or CPTs because of the Singleton pattern no more working with PHP 8.1 so below is the solution for the same.
|
public static function instance() { |
Replace this with below
public static function instance() {
static $instance=[];
if (!isset($instance[static::class])) {
$instance[static::class] = new static();
}
return $instance[static::class];
}
Hello after updating PHP 8.1 we are fetching issues like not showing more custom taxonomy or CPTs because of the Singleton pattern no more working with PHP 8.1 so below is the solution for the same.
wordpress-theme-framework/framework/Objects/Singleton.php
Line 15 in 34d1ac1
Replace this with below
public static function instance() {
static $instance=[];
if (!isset($instance[static::class])) {
$instance[static::class] = new static();
}
return $instance[static::class];
}