I am not clear about something and need your kind help. I have a JSON file in the same theme and I want to open the json file to get the content. I know wp_remote_get is for remote request. What function will I use for same domain requests.


1 Answer 1


Depends if you're requesting from server side or front end.

In PHP you can use file_get_contents() function.

In jQuery, you can use the HTTP get.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.