Title: Replace WordPress HTML output with New function
Last modified: August 19, 2016

---

# Replace WordPress HTML output with New function

 *  [tsalagi](https://wordpress.org/support/users/tsalagi/)
 * (@tsalagi)
 * [15 years, 8 months ago](https://wordpress.org/support/topic/replace-wordpress-html-output-with-new-function/)
 * Some of the WordPress functions output HTML table tags which I would like to 
   replace with unordered list tags. I’m wondering if there are any issues, other
   then updates and changes to the core, that I need to be worried about. For example
   I copied a function to my function file, change the name and changed the table
   tags to ordered list tags. I changed the call to my new function and it runs 
   fine without any errors. Any thoughst would be appreciated.

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

 *  Moderator [Samuel Wood (Otto)](https://wordpress.org/support/users/otto42/)
 * (@otto42)
 * WordPress.org Admin
 * [15 years, 8 months ago](https://wordpress.org/support/topic/replace-wordpress-html-output-with-new-function/#post-1677458)
 * It’s hard to say without more details. Which functions are you referring to?
 *  Thread Starter [tsalagi](https://wordpress.org/support/users/tsalagi/)
 * (@tsalagi)
 * [15 years, 8 months ago](https://wordpress.org/support/topic/replace-wordpress-html-output-with-new-function/#post-1677465)
 * Thanks Otto. Here are the functions
 *     ```
       function do_settings_sections($page) {
           global $wp_settings_sections, $wp_settings_fields;
   
           if ( !isset($wp_settings_sections) || !isset($wp_settings_sections[$page]) )
               return;
   
           foreach ( (array) $wp_settings_sections[$page] as $section ) {
               echo "<h3>{$section['title']}</h3>\n";
               call_user_func($section['callback'], $section);
               if ( !isset($wp_settings_fields) || !isset($wp_settings_fields[$page]) || !isset($wp_settings_fields[$page][$section['id']]) )
                   continue;
               echo '<table class="form-table">';
               do_settings_fields($page, $section['id']);
               echo '</table>';
           }
       }
       ```
   
 * and
 *     ```
       function do_settings_fields($page, $section) {
           global $wp_settings_fields;
   
           if ( !isset($wp_settings_fields) || !isset($wp_settings_fields[$page]) || !isset($wp_settings_fields[$page][$section]) )
               return;
   
           foreach ( (array) $wp_settings_fields[$page][$section] as $field ) {
               echo '<tr valign="top">';
               if ( !empty($field['args']['label_for']) )
                   echo '<th scope="row"><label for="' . $field['args']['label_for'] . '">' . $field['title'] . '</label></th>';
               else
                   echo '<th scope="row">' . $field['title'] . '</th>';
               echo '<td>';
               call_user_func($field['callback'], $field['args']);
               echo '</td>';
               echo '</tr>';
           }
       }
       ```
   
 *  Moderator [Samuel Wood (Otto)](https://wordpress.org/support/users/otto42/)
 * (@otto42)
 * WordPress.org Admin
 * [15 years, 8 months ago](https://wordpress.org/support/topic/replace-wordpress-html-output-with-new-function/#post-1677473)
 * Editing those parts of the core might be a *really* bad idea. Those are core 
   parts of the Settings API, and plugins use them and expect them to behave in 
   a certain way. Changing those will very likely affect how plugins settings screens
   work.
 * If you want to use a different method for displaying options in your own plugin
   or theme or something, you don’t really need to copy those functions to different
   names. Just make your plugin screen the way you want to make it instead of using
   those parts of the Settings API.

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

The topic ‘Replace WordPress HTML output with New function’ is closed to new replies.

 * 3 replies
 * 2 participants
 * Last reply from: [Samuel Wood (Otto)](https://wordpress.org/support/users/otto42/)
 * Last activity: [15 years, 8 months ago](https://wordpress.org/support/topic/replace-wordpress-html-output-with-new-function/#post-1677473)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
