I am building an RSS reader plugin and I’d like some advice on how to store the data and settings for this plugin.
The idea is to be able to enter a set of feed sources and associate each one of these sources with one or more categories. Thus you can have several categories e.g. sports, politics each having their own associated feed sources.
So for example:
When the feed items from these feed sources are imported every few hours via Cron they are then stored as custom post types. Each feed item must of course be associated with the feed source.
When it comes to display feed items the plugin will use this logic:
Check which category is being called (via shortcode)
Check which feed sources are associated with that category
Get feed items associated with feed sources identified in step 2
I am still unsure about how all this data needs to be stored.
The plugin will have a settings page and for that I am settled about storing everything in the wp_options table.
However when it comes to the feed sources, categories and feed items, I’m still confused how to store them best.
Any suggestions on how to do this?
I’ve been reading about the CPTonomies plugin which seems to do what I need, but I want the functionality in built into this plugin and I cannot use another external plugin.
- The topic ‘How to store data for my plugin?’ is closed to new replies.