WordPress.org

Deutsch

Plugin-Verzeichnis

Test out the new Plugin Directory and let us know what you think.

Advanced Custom Fields: Table Field

A Table Field Add-on for the Advanced Custom Fields Plugin

The Table field plugin enables easely editing a table.
The plugin ist compatible with ACF4 and ACF5.
The table field works also with the repeater and flexible field types.

  • table header (option)
  • add and remove table columns and rows
  • change order of columns and rows by dragging

To display the table fields data as an html table you can start with the following code.

$table = get_field( 'your_table_field_name' );

if ( $table ) {

    echo '<table border="0">';

        if ( $table['header'] ) {

            echo '<thead>';

                echo '<tr>';

                    foreach ( $table['header'] as $th ) {

                        echo '<th>';
                            echo $th['c'];
                        echo '</th>';
                    }

                echo '</tr>';

            echo '</thead>';
        }

        echo '<tbody>';

            foreach ( $table['body'] as $tr ) {

                echo '<tr>';

                    foreach ( $tr as $td ) {

                        echo '<td>';
                            echo $td['c'];
                        echo '</td>';
                    }

                echo '</tr>';
            }

        echo '</tbody>';

    echo '</table>';
}
Tags:

Requires: 4.5.3 or higher
Compatible up to: 4.6.3
Zuletzt aktualisiert: 6 Monaten ago
Aktive Installationen: 9,000+

Bewertungen

5 von 5 Sternen

Support

0 of 3 support threads in the last two months have been marked resolved.

Möchtest du etwas sagen? Brauchst du Unterstützung?

Kompatibilität

+
=
Not enough data

0 Benutzer sagen, dass es funktioniert.
Ein Benutzer sagt, dass es nicht funktioniert.

100,1,1
100,1,1 0,1,0 100,1,1
0,1,0 100,1,1
100,2,2
100,1,1
100,1,1
100,2,2
100,1,1
0,1,0