Title: add_settings_section() order
Last modified: November 23, 2016

---

# add_settings_section() order

 *  Resolved [Dark Roast](https://wordpress.org/support/users/dark-roast/)
 * (@dark-roast)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/add_settings_section-order/)
 * I made on a custom theme for a client. For this theme I created a settingspage
   so my client could edit some variables to his liking. Works like i want it.
 * For this same site I created a Custom Post Type as a plugin. I need the client
   to be able to edit some variables for this custom post type aswell. So I like
   my plugin to add an other settings section to my settingspage. I’m using this
   code in my plugin:
 *     ```
       function dr_issue_settings_init() {
   
       	add_settings_section(
       		'dr_issue_section', //$id
       		__( 'Issue settings' ), //title
       		'dr_issue_section_callback', //callback
       		'mytheme_settings' // page
       	);
   
       }
       add_action( 'admin_init', 'dr_issue_settings_init' );
       ```
   
 * The problem is; this section appears before the theme settings I created before.
   
   In the global $wp_settings_sections this plugin section is the first value of
   the array, before the theme section.
 * How can I make my plugin section be underneath the theme section?

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Moderator [bcworkz](https://wordpress.org/support/users/bcworkz/)
 * (@bcworkz)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/add_settings_section-order/#post-8474550)
 * All other things being equal, plugins load before themes, so your plugin section
   is added before the theme’s sections. Make things unequal by adding a late priority
   number to your add_action() call so that your callback runs after the theme sections
   have already been added.
 * The default priority is 10, so anything higher/later than 10 should work, such
   as
    `add_action( 'admin_init', 'dr_issue_settings_init', 20 );`
 *  Thread Starter [Dark Roast](https://wordpress.org/support/users/dark-roast/)
 * (@dark-roast)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/add_settings_section-order/#post-8478058)
 * Thanx a lot. It indeed was the priority.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘add_settings_section() order’ is closed to new replies.

 * In: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
 * 2 replies
 * 2 participants
 * Last reply from: [Dark Roast](https://wordpress.org/support/users/dark-roast/)
 * Last activity: [9 years, 6 months ago](https://wordpress.org/support/topic/add_settings_section-order/#post-8478058)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
