Add plugin options
-
I’m writing a plugin and I’ve added an options page to set my options via the settings API.
I just added one quick option as a proof of concept and all seems to work fine (never coded anything for wordpress before).
Now I want to do something different. I want to generate an option for each post in a certain category. Let’s say “colors”. I have three posts in there. A post about blue, one about red and one about yellow.
What I’m trying to achieve, is some kind of interface in the options page that says “add row”. I click this button and an option row appears with a select box containing the three pages (blue, red, yellow) and a text field next to it to define the option.
Next time I click the plus button, only two of the remaining pages should be in the select box, because one option is already defined… is something like this possible somehow? Are there wordpress functions to do this easily? Or are you aware of any existing code that I could study with a feature like that? My aim is to learn how to do this so any pointers would be relevant and helpful. Thanks for your time, I appreciate it!
- The topic ‘Add plugin options’ is closed to new replies.