Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter costellos

    (@costellos)

    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

    (@jonua)

    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.