Im trying to use ACF to give each post-item a custom margin. So every post has 4 meta items for all values of margin.
Im trying to get post grid to add the margin\'s to each post individually with a function.
add_action(\'post_grid_layout_element_css_excerpt\', \'custom_css\', 10);
$post_id = $layout_args[\'post_id\'];
margin-top: the_field(\'margin-top\')px !important;
margin-bottom: the_field(\'margin-bottom\')px !important;
margin-right: the_field(\'margin-right\')px !important;
margin-left: the_field(\'margin-left\')px !important;
But can\'t get it to work.
Welcome to our forum.
Unfortunately sorry to say, don’t understand the issue clearly, could you please send me your post grid page url to see what are you trying to do.
If possible please send me some screenshots.