Phox Elements
DYNAMIC Custom field tables for Breakdance

Show an ACF table field as a styled, responsive table

ACF/SCF Table reads a table field from the current post and outputs it as a proper HTML table. Edit rows and columns in the post editor and the page follows. Style it in Breakdance and switch on responsive mode for small screens.

Works with ACF and SCF Optional responsive mode Header, caption and body support
Live demos

Four tables, each from its own custom field

Every table below is an ACF/SCF Table element reading a different table field saved on this page. Hover a row to see its hover colour. Narrow your browser below 768px, or open the page on a phone, to see responsive mode stack each row with its column names.

Spec sheet

Compare two espresso machines

Field pxe_spec_table. Purple header, white and pale lilac striped rows, a lilac hover colour and 1px borders on every cell.

SpecificationCove MiniCove Pro
BoilerSingle, 1.2 litresDual, 2.5 litres
Water tank1.8 litres3 litres
Heat-up time5 minutes9 minutes
Built-in grinderYes, 30 settingsNo
Steam wandManualManual, cool-touch
Weight11 kg21 kg
Warranty2 years3 years
Nutrition table

Country sourdough, per 100g and per slice

Field pxe_nutrition_table. A cream header, no striping and bottom borders only, for a clean food label look.

NutrientPer 100gPer slice (40g)
Energy1000 kJ / 239 kcal400 kJ / 96 kcal
Fat1.2g0.5g
of which saturates0.2g0.1g
Carbohydrate47g18.8g
of which sugars1.8g0.7g
Fibre3.1g1.2g
Protein8.9g3.6g
Salt1.1g0.44g
Timetable

A weekly gym class timetable

Field pxe_timetable_table. Dark header and rows, a slightly lighter even row and a grey hover colour.

TimeMondayWednesdayFriday
06:30SpinStrength circuitSpin
12:15Lunchtime HIITPilatesLunchtime HIIT
18:00BoxfitSpinKettlebells
19:15Yoga flowBoxfitYoga flow
Price list

Room rates per night, by season

Field pxe_rates_table. A teal header, mint even rows, extra cell padding and bottom borders only.

RoomSleepsNov to MarApr to Oct
Garden Double2£95£140
Harbour View Double2£120£175
Family Room4£150£210
Deluxe Suite3£210£290
How it works

Three steps to a dynamic table

Set up the field once, then manage the table from the post editor.

1

Add a table field

Install the free Table Field add-on for ACF and add a table field to your field group.

2

Add the element

Drop ACF/SCF Table onto your page or template and enter the field's meta key.

3

Fill in the table

Add rows, columns, a header and a caption in the post editor. The element outputs them as a table.

Features

What the element gives you

The content lives in your custom field. The look is set in Breakdance.

Reads a table field

Enter the meta key of a table field and the element outputs its header, caption and body rows.

Responsive mode

Below 768px the header row hides and each row becomes a stacked block, with the column name shown beside every value.

Horizontal scroll fallback

With responsive mode off, a wide table scrolls sideways inside its container instead of breaking the layout.

Row colours

Set the header background, the row background, a separate even-row colour and a row hover colour.

Header and body typography

Style the header text and the body text separately with the Breakdance typography controls.

Cell borders and padding

Add inner borders to every cell and set one padding value for header and body cells.

Captions

If the field has a caption switched on and filled in, it is shown above the table.

HTML in cells

Cell content is passed through WordPress's safe HTML filter, so links and simple formatting in cells are kept.

Works in templates

The field is read from the current post, so one template can show a different table on every post.

Use cases

Where it works best

Anywhere tabular content changes from post to post.

01

Product specifications

Show a spec sheet on each product or service page, edited in the post.

02

Price lists

Keep prices in a table field so they can be updated without opening the builder.

03

Timetables

List class times, opening hours or event schedules.

04

Comparison tables

Compare plans, models or options side by side.

05

Course details

Show modules, dates and locations for each course.

06

Client-edited data

Let clients edit a table in a simple field without touching the page layout.

Settings reference

Every control, explained

This is the full list of settings in the Breakdance editor.

ControlWhat it doesDefault
Content
Table Meta KeyThe name of the table field to display.table
Responsive ModeStack rows as cards below 768px, with column labels beside each value.Off
Design
Header Background ColorBackground colour of the header row.—
Row Background ColorBackground colour of body cells.—
Even Row Background ColorBackground colour of every second row.—
Row Hover ColorBackground colour of a row when hovered.—
Cell PaddingPadding inside header and body cells.—
Typography
Header TypographyText style of the header row.—
Body TypographyText style of the body cells.—
Borders
Inner BordersBorders on every header and body cell.—
Responsive Styles (responsive mode only)
Row GapSpace between stacked rows on small screens.—
Column GapSpace between the stacked cells inside each row.—
Tips & FAQ

Good to know

Which field does it need?

A table field from the free Table Field add-on for ACF. Enter the field name in Table Meta Key.

Does it work with Secure Custom Fields (SCF)?

The element reads the field with get_field(), which SCF provides as well as ACF, so the table field works with either.

What happens on mobile?

With responsive mode on, the header row hides below 768px and each row stacks, with its column name beside every value. With it off, the table scrolls sideways.

Can I use it in a template?

Yes. It reads the field from the current post, so a single template can show each post's own table.

What if the field is empty?

Nothing is output, so you will not get an empty table on posts without data.

Can I show more than one table on a page?

Yes. Add one table field per table and give each element its own meta key. The four demos above each read a different field.

Add ACF/SCF Table to your next page

ACF/SCF Table is included with Phox Elements, along with 140+ other premium elements for Breakdance.