Question

I am currently developing a WordPress plugin using the WordPress Settings API to create an option page. So I am using register_setting, add_settings_field, settings_fields and do_settings_sections to create the HTML code.

This all works fine.

However I need to device the settings in various tabs of a jQuery UI tab interface.

Currently I am using the callback function within add_settings_field to generate the HTML for the specific element, but each element now has to be assigned to a specific tab sheet.

I am aware that WordPress API has tabs built in also, but these require me to save settings before I change between them and this is not what I am currently looking for.

Was it helpful?

Solution

I have solved the problem by creating my own version of do_settings_sections and settings_fields based upon the WordPress one. Within these custom functions (only available for the plugin it self) I am adjusting the HTML that is rendered so the DIV elements required for jQuery are put on the right places.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top