I have a php file which holds a script within my wordpress theme folder which i am trying to view directly via a relative path in the browser ie: www.mywebsite.com/wp-content/themes/my-theme-name/file-in-question.php
however wordpress is giving a 404 error as soon as i try to view it directly.
I would create a template within wordpress but for the script to work i need to view it with the .php extension in the browser since its basically a custom search to another script outside wordpress which returns results like so:
www.mywebsite.com/wp-content/themes/my-theme-name/file-in-question.php?controller=Listings ecc....
All I need is to be able to view the php file without wordpress giving me a 404 error
I should also mention that this happens with any other php file within the theme. I can acess .html files and images (placed them on purpose its only on php file extensions.
Thanks in advance.