KrisChase.com

Automatically check WPML custom field checkboxes

Posted in Web Development on 06.10.2015 by @chasebadkids

Today I faced a pretty daunting task, I needed to check around 2,600 rows of checkboxes across 4 different sites, each that had 3 different options.

You might face this yourself within the WordPress WPML ( WordPress Multi Site) custom field / ACF / Advanced custom fields area.  What I wanted to do was programmatically send off the correct job translations that I wanted, and not send off the ones that didn’t need to be translated.

This handy snippet that I came up with solved just that!

You will need to tweak / modify this yourself to fit your specific needs, but this will work perfectly within the Chrome network inspect / developer tools of your choice.

Enjoy!

Menu