Title: colspan with TH
Last modified: August 24, 2016

---

# colspan with TH

 *  Resolved [costellos](https://wordpress.org/support/users/costellos/)
 * (@costellos)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/colspan-with-th/)
 * Is it possible to do some sort of colspan the th row?
 * Thanks,
    Steven Costello Costello Coding
 * [https://wordpress.org/plugins/advanced-custom-fields-table-field/](https://wordpress.org/plugins/advanced-custom-fields-table-field/)

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

 *  Thread Starter [costellos](https://wordpress.org/support/users/costellos/)
 * (@costellos)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/colspan-with-th/#post-6124477)
 * Still hoping for a native way to solve this, but for any one looking for a quick
   fix I came up with a solutions.
 * Create 2 Fields:
    1st: A select field call it Header ColSpan. 2nd: A Number or
   text field call it Header Colspan Number
 * Then replace in the front th foreach loop with this:
 *     ```
       <?php
       	$if_colspan_header = get_sub_field('header_colspan');
       	$header_colspan = get_sub_field('header_colspan_number');
       ?>
       <?php foreach ( $table['header'] as $th ) { ?>
   
       <th <?php if($if_colspan_header == 'Yes'){echo 'colspan="'.$num_of_colspan.'"';}?>><?php echo $th['c']; ?></th>
       <?php if($if_colspan_header == 'Yes'){
       break;
       }
       } ?>
       ```
   
 * This will work, but I would like a native way to do this.
 * Thanks,
    Steven Costello Costello Coding
 *  Plugin Author [Johann Heyne](https://wordpress.org/support/users/jonua/)
 * (@jonua)
 * [11 years ago](https://wordpress.org/support/topic/colspan-with-th/#post-6124768)
 * Thanks for helping yourself. The native colspan and rowspan is not trivial. I
   put this on my feature request list.

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

The topic ‘colspan with TH’ 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/)

 * 2 replies
 * 2 participants
 * Last reply from: [Johann Heyne](https://wordpress.org/support/users/jonua/)
 * Last activity: [11 years ago](https://wordpress.org/support/topic/colspan-with-th/#post-6124768)
 * Status: resolved