namespace App\Controllers; use App\Controllers\Partials\Search; use Sober\Controller\Controller; class ArchiveAncillaryService extends Controller { use Search; public function ancillaryServices() { global $post; $ancillary_services = []; $posts = $this->getPosts('ancillary-service', array('search_tokens', 'text_content'), get_query_var('query')); foreach ($posts as $post) { setup_postdata($post); $specialisation = [ 'title' => get_the_title(), 'icon' => get_field('icon'), 'colour' => get_field('colour'), 'excerpt' => get_field('excerpt'), 'permalink' => get_permalink() ]; $ancillary_services[] = (object) $ancillary_service; wp_reset_postdata(); } return $ancillary_services; }
Fatal error: Uncaught ReflectionException: Class App\Controllers\ArchiveAncillaryService does not exist in /var/www/vhosts/busamed.co.za/httpdocs/wp-content/themes/neutron/vendor/soberwp/controller/src/Loader.php:121 Stack trace: #0 /var/www/vhosts/busamed.co.za/httpdocs/wp-content/themes/neutron/vendor/soberwp/controller/src/Loader.php(121): ReflectionClass->__construct('App\\Controllers...') #1 /var/www/vhosts/busamed.co.za/httpdocs/wp-content/themes/neutron/vendor/soberwp/controller/src/Loader.php(49): Sober\Controller\Loader->setClassesAlias() #2 /var/www/vhosts/busamed.co.za/httpdocs/wp-content/themes/neutron/vendor/soberwp/controller/controller.php(22): Sober\Controller\Loader->__construct(Object(Brain\Hierarchy\Hierarchy)) #3 /var/www/vhosts/busamed.co.za/httpdocs/wp-includes/class-wp-hook.php(286): Sober\Controller\loader('') #4 /var/www/vhosts/busamed.co.za/httpdocs/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters(NULL, Array) #5 /var/www/vhosts/busamed.co.za/httpdocs/wp-includes/plugin.php(465): WP_Hoo in /var/www/vhosts/busamed.co.za/httpdocs/wp-content/themes/neutron/vendor/soberwp/controller/src/Loader.php on line 121