Monday, December 19, 2016

WordPress ACF - how to populate a custom field of type "File" from code

If you would like to upload a new file and store it as an ACF file type, you should probably look at this thread:

http://stackoverflow.com/questions/15638046/how-to-upload-an-image-on-acf-with-update-field-on-wordpress

The idea behind ACF's file type field is that it accepts a WP Attachment.  WP attachment is a special post type in WP, which can be generated by this function:

wp_insert_attachment



No comments:

Post a Comment

Ubuntu 12.04, 14.04, 16.04 - auto start an app or script before login

To run a command or application at startup, even before the user has logged in, you can use this file: /etc/rc.local The commands entered...