How do I customize the templates to match my theme?

I’ve tried adding single-classifieds.php to my theme directory, but it ends up spitting out errors like this:

FATAL ERROR: USING $THIS WHEN NOT IN OBJECT CONTEXT

Specifically for the get_expiration_date function. How would I get the expiration date in a custom template in my theme folder?

Also, the Posted By username doesn’t show up in BuddyPress. I’m not sure if there are any other issues at this point, but if I could at least get this cleared up, I’m sure I can extrapolate the information I’ll need to troubleshoot any additional issues I may run into.

Thanks.