Skip to content

Instantly share code, notes, and snippets.

@fahmi182
Last active January 27, 2018 03:51
Show Gist options
  • Save fahmi182/8e1498cd6fdf8e25e97493b35bc3bfa3 to your computer and use it in GitHub Desktop.
Save fahmi182/8e1498cd6fdf8e25e97493b35bc3bfa3 to your computer and use it in GitHub Desktop.
if(get_field('ifspecs')) {
echo '<div id="specs"><h2>Harga dan Spesifikasi</h2>';
if(get_field('body1')) {
$body_name = get_field_object('body1');
if( have_rows('body1') ):
while( have_rows('body1') ) : the_row();
echo '<table cellspacing="0">';
echo '<tbody>';
$dimensi_name = get_sub_field_object('dimensi1');
$dimensi = get_sub_field('dimensi1');
$berat_name = get_sub_field_object('berat1');
$berat = get_sub_field('berat1');
$slotsim_name = get_sub_field_object('slot_sim1');
$slotsim = get_sub_field('slot_sim1');
echo '<tr>';
echo '<th rowspan="6" scope="row">'. $body_name['label'] .'</th>';
echo '<td>'. $dimensi_name['label'] .'</td>';
echo '<td>'. $dimensi .'</td>';
echo '</tr>';
echo '<tr>';
echo '<td>'. $berat_name['label'] .'</td>';
echo '<td>'. $berat .'</td>';
echo '</tr>';
echo '<tr>';
echo '<td>'. $slotsim_name['label'] .'</td>';
echo '<td>'. $slotsim .'</td>';
echo '</tr>';
echo '</tbody>';
echo '</table>';
endwhile;
endif;
}
echo '</div>';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment