Using Classes in single-{CPT}.php

I am using a class for retrieving post data in plugin-folder > includes > PostData.php and I have a single page for custom post type plugin-folder > single-look.php Now i want to use that class in single file.I am doing it right below


$id = get_the_ID();

$postdata = new PostData($id);

But i am getting Fatal Error : : Class ‘PostData’ not found in …..on line 7.
I need to know how i can link between this two??That class is loaded in plugin init.

Read more here:: Using Classes in single-{CPT}.php

Leave a Reply

Your email address will not be published. Required fields are marked *