开发者

Creating a virtual, data-driven section of a Wordpress-powered site

开发者 https://www.devze.com 2022-12-28 05:30 出处:网络
I want to create a plugin for wordpress to automatically serve pages containing data pulled from a provider\'s API.

I want to create a plugin for wordpress to automatically serve pages containing data pulled from a provider's API.

The API returns one or more records containing data for that record and I simply want to have the plugin intercept the request, call the API with parameters pulled from the req开发者_Python百科uest URI and display the data using a template that I can either let them upload to the server or let them copy and paste into the plugins admin settings.

For example, I may want one of my wordpress installations to show products pulled from such an API under the url "example.com/products". The plugin would catch that request, extract the variables from the URL, call the API and render the template with the returned results.

I'd like to avoid requiring editing the .htaccess file like some caching plugins do. Some of the admins of these pages won't know how to do that or simply won't have access to the .htaccess file.

Thanks!


What provider are you referring too? There might already be a plugin, or there are plugins that will give code examples on how to work with your API: WordPress › WordPress Plugins

0

精彩评论

暂无评论...
验证码 换一张
取 消