Correct way adding External classes to Custom Post type and output their methods to template

Question

So I’m creating Custom Post Type, and I have 3 external classes with namespace TestEventsModel;
Those 3 classes are final class Location, final class Event, and final class Person. Example of method:

public function street(): string
{
return 'Street name 2';
}

For template, I’m using single-event.php.
My question is, How to hook all those classes and their methods? Everything I have tried it’s not working, so I’m missing something for sure.

Thank you all!

0
, , , Marina M 4 years 2020-05-28T07:10:19-05:00 0 Answers 92 views 0

Leave an answer

Browse
Browse