Why is the API base the Site Address URL and not the WordPress Address URL?
-
Currently, I’m using this plugin to pull post data from my WordPress site (blog.mydomain.com) and display it in an external site (mydomain.com). All was working fine today, until I went to change the Site Address in WordPress to that of the new site and found that my external site was no longer displaying post data.
Upon further investigation, I found that it was because the API base for the plugin uses the Site Address in order to establish a URL that the JSON post queries will be sent to. The API base of the plugin was changed to mydomain.com/api, so the external site was trying to reference itself to make an API call and failing.
So, this leads me to wonder, why is it set up this way? If you’re querying post data via JSON, wouldn’t you always want that data to come from the WordPress Address URL as opposed to the Site Address URL? Am I totally off-base here. Is there another workaround?
- The topic ‘Why is the API base the Site Address URL and not the WordPress Address URL?’ is closed to new replies.