WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

So I am creating my first plugin for positioning ads around my site. I created one separate table where I store ads with all their options, such as position, expire date, active, name, type etc... But Now I need just one field where I can allow users to create categories for these ads, add new, delete existing categories etc, so an array of data... I am looking at add_options and update_options ,can I use this options API for array ?

For example, I have a form where user can add new categories, but if I use update_options, I suppose that I will just replace latest added category, instead adding it to an array ? Shall I extract current data, add this one and update it ?

I am also relative new with PHP but expert in front end.

I know that I can do it easly with new table, but I am trying to use WP built in stuffs as much as possible.

share|improve this question
up vote 0 down vote accepted

Create the ads as custom post types and register one or more custom taxonomies for these post types. You can set up the other meta data as post meta (also known as custom fields).

The options table is probably not the best place for these data; because you have to reinvent the wheel.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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