Skip to content

Instantly share code, notes, and snippets.

@theJasonJones
theJasonJones / README.md
Last active June 27, 2024 22:53
Auto Populate Wordpress ACF Repeater values

Add default values to ACF Repeater Fields

I came across this solution when I had about a ton of posts (200+) with values in various PDFs. I didn't want to have to spend time filling out the same values over and over again.

Walkthrough

This case is pretty straight forward; I have one repeater field field_123a56b7cb890 that has a text fields inside it (field_588a24c3cb782). I haven't tried any other types like post objects or radio buttons, but I'm sure it can be done.

Step 1. Hook into acf/load_value on your repeater field. You can use type/key/name as desired here.

@leemeichin
leemeichin / README.md
Created April 12, 2012 12:02
Modulo Liquid filter for Jekyll

Modulo Liquid filter for Jekyll

Got nested columns in your grid-based Jekyll site?

Wondered why you didn't have a way to calculate the modulo inside your posts loop to open and close your 'rows' containing those nested columns?

Add this filter to your _plugins directory, and use it like so:

{{ x | mod:y }}