Custom API in Real home wordpress theme

I have created my custom endpoint in a separate theme, but now I want to use that endpoint in Real home theme. I have placed the code snippet in the functions.php, but it is not working


Contact with your item author hope they will help you out from your issue