Codex

Function Reference/add settings section

Contents

Description

Settings Sections are the groups of settings you see on WordPress settings pages with a shared heading. In your plugin you can add new sections to existing settings pages rather than creating a whole new page. This makes your plugin simpler to maintain and creates less new pages for users to learn. You just tell them to change your setting on the relevant existing page.

Usage

<?php add_settings_section($id$title$callback$page); ?>

Parameters

  • $id (string) - String for use in the 'id' attribute of tags.
  • $title (string) - Title of the section.
  • $callback (string) - Function that fills the section with the desired content. The function should echo its output.
  • $page (string) - The type of settings page on which to show the section (general, reading, writing, media etc.)

Change Log

Since: 2.7.0

Source File

add_settings_field() is located in wp-admin/includes/template.php.

Related

Settings API: register_setting, unregister_setting, add_settings_field, add_settings_section

See also index of Function Reference and index of Template Tags.