Grid layout using ACF values?

Hi!

I am trying to build a grid layout like this to showcase some projects (is a Custom Post Type).

I need the possibility to decide where a Tile appears in my grid with a layout of repeat(8,1fr) using ACF.

So basically, editors could choose where a tile will appear.

I have 2 ACF number fields: Grid Column and Grid Row.

I tried to use {acf_grid_column} and {acf_grid_row} as attribute, but it did not work

Any tips?

Add it as attribute to element:
Key - style
value - grid-column:{acf_grid_column};grid-row:{acf_grid_row};

1 Like

It worked! Thanks!

Do you know how can I say that the first row in the grid should be empty? is also doable?

Try to rewrite your grid-rows to 2/3 instead of 1/2 and change grid-auto-rows to 1fr