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.

1 Answer 1


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.

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.