Title: Create a TH row
Last modified: August 24, 2016

---

# Create a TH row

 *  Resolved [Dan Stramer](https://wordpress.org/support/users/danstramer/)
 * (@danstramer)
 * [10 years, 12 months ago](https://wordpress.org/support/topic/create-a-th-row/)
 * Hi
    Can I create a row of TH (instead of td) in a table, except for the firs 
   row? For example, after 5 rows make a TH row.
 * Thanks
    Dan
 * [https://wordpress.org/plugins/advanced-custom-fields-table-field/](https://wordpress.org/plugins/advanced-custom-fields-table-field/)

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

 *  Plugin Author [Johann Heyne](https://wordpress.org/support/users/jonua/)
 * (@jonua)
 * [10 years, 12 months ago](https://wordpress.org/support/topic/create-a-th-row/#post-6121171)
 * You could repeat the header after an interval…
 *     ```
       $table = get_field( 'your_table_field_name' );
   
       if ( $table ) {
   
           echo '<table border="0">';
   
               echo '<tbody>';
   
                   $i = 0;
                   $header_interval = 10;
   
                   foreach ( $table['body'] as $tr ) {
   
                       // header cells by interval
   
                       if ( $i === $header_interval ) {
   
                           $i = 0;
                       }
   
                       if ( $table['header'] AND $i === 0 ) {
   
                           echo '<tr>';
   
                               foreach ( $table['header'] as $th ) {
   
                                   echo '<th>';
                                       echo $th['c'];
                                   echo '</th>';
                               }
   
                           echo '</tr>';
   
                           $i = 0;
                       }
   
                       $i++;
   
                       // normal cells
   
                       echo '<tr>';
   
                           foreach ( $tr as $td ) {
   
                               echo '<td>';
                                   echo $td['c'];
                               echo '</td>';
                           }
   
                       echo '</tr>';
                   }
   
               echo '</tbody>';
   
           echo '</table>';
       }
       ```
   
 *  Thread Starter [Dan Stramer](https://wordpress.org/support/users/danstramer/)
 * (@danstramer)
 * [10 years, 12 months ago](https://wordpress.org/support/topic/create-a-th-row/#post-6121173)
 * Thanks,
    So this is done automatically and not by the admin end?
 * Dan
 *  Plugin Author [Johann Heyne](https://wordpress.org/support/users/jonua/)
 * (@jonua)
 * [10 years, 12 months ago](https://wordpress.org/support/topic/create-a-th-row/#post-6121179)
 * Right, there is no way to define any cells, rows, columns features yet.

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

The topic ‘Create a TH row’ is closed to new replies.

 * ![](https://ps.w.org/advanced-custom-fields-table-field/assets/icon-256x256.png?
   rev=1962986)
 * [Table Field Add-on for ACF and SCF](https://wordpress.org/plugins/advanced-custom-fields-table-field/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/advanced-custom-fields-table-field/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/advanced-custom-fields-table-field/)
 * [Active Topics](https://wordpress.org/support/plugin/advanced-custom-fields-table-field/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/advanced-custom-fields-table-field/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/advanced-custom-fields-table-field/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Johann Heyne](https://wordpress.org/support/users/jonua/)
 * Last activity: [10 years, 12 months ago](https://wordpress.org/support/topic/create-a-th-row/#post-6121179)
 * Status: resolved