I'm a beginner plugin developer. I need my plugin to save and edit multiple indexed sets of key/value pairs on my custom settings page and retrieve later them by their index on the Appearance>>Widgets page.

Is it best to create a custom table in the database for this or does the Settings API have dimensional accommodation for this? If so can someone please get me pointed in the right direction?


2 Answers 2


Because you mentioned the Settings API I assume you want to do AJAX from the admin area of wordpress. You have some research to do, so my answer is to check out these:



That should get you where you need to go. Happy Wordpressing!

  • Looks like Pippin's gotta eat too. Now he wants paid for the info :-/
    – N Barns
    May 15, 2017 at 15:31

The short answer is to go ahead and expand the existing wordpress database. That is because the Settings API really only goes one dimensional and would be a very inefficient use of the database. https://pippinsplugins.com/custom-database-api-reasons-for-custom-tables-and-an-api/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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