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];
}